Fixes regression on Audio and Document models for unicode fields #65

This commit is contained in:
Leandro Toledo 2015-09-24 09:10:33 -03:00
parent 797a3e6ea4
commit 855ab19dea
2 changed files with 3 additions and 3 deletions

View file

@ -52,8 +52,8 @@ class Audio(TelegramObject):
self.file_id = str(file_id)
self.duration = int(duration)
# Optionals
self.performer = str(kwargs.get('performer', ''))
self.title = str(kwargs.get('title', ''))
self.performer = kwargs.get('performer', '')
self.title = kwargs.get('title', '')
self.mime_type = str(kwargs.get('mime_type', ''))
self.file_size = int(kwargs.get('file_size', 0))

View file

@ -49,7 +49,7 @@ class Document(TelegramObject):
self.file_id = str(file_id)
# Optionals
self.thumb = kwargs.get('thumb')
self.file_name = str(kwargs.get('file_name', ''))
self.file_name = kwargs.get('file_name', '')
self.mime_type = str(kwargs.get('mime_type', ''))
self.file_size = int(kwargs.get('file_size', 0))