Filter None values out from stringified file ids

This commit is contained in:
Dan 2020-11-27 14:01:13 +01:00
parent a2d7da1f59
commit fa820328c3

View File

@ -395,7 +395,7 @@ class FileId:
return b64_encode(rle_encode(buffer.getvalue())) return b64_encode(rle_encode(buffer.getvalue()))
def __str__(self): 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): class FileUniqueType(IntEnum):
@ -475,4 +475,4 @@ class FileUniqueId:
return b64_encode(rle_encode(string)) return b64_encode(rle_encode(string))
def __str__(self): def __str__(self):
return str(self.__dict__) return str({k: v for k, v in self.__dict__.items() if v is not None})