From fa820328c3edfe0ea22aa9ff56a52cde6a04198b Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 27 Nov 2020 14:01:13 +0100 Subject: [PATCH] Filter None values out from stringified file ids --- pyrogram/file_id.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/file_id.py b/pyrogram/file_id.py index b64de423..0fa5e3d0 100644 --- a/pyrogram/file_id.py +++ b/pyrogram/file_id.py @@ -395,7 +395,7 @@ class FileId: return b64_encode(rle_encode(buffer.getvalue())) def __str__(self): - return str(self.__dict__) + return str({k: v for k, v in self.__dict__.items() if v is not None}) class FileUniqueType(IntEnum): @@ -475,4 +475,4 @@ class FileUniqueId: return b64_encode(rle_encode(string)) def __str__(self): - return str(self.__dict__) + return str({k: v for k, v in self.__dict__.items() if v is not None})