Fix error syncing private chat portals with no avatar

This commit is contained in:
Tulir Asokan
2020-05-20 23:29:36 +03:00
parent 9081f6bce4
commit 05e966011e
+1 -1
View File
@@ -686,7 +686,7 @@ class PortalMetadata(BasePortal, ABC):
elif isinstance(photo, Photo):
loc, largest = self._get_largest_photo_size(photo)
photo_id = f"{largest.location.volume_id}-{largest.location.local_id}"
elif isinstance(photo, (UserProfilePhotoEmpty, ChatPhotoEmpty, PhotoEmpty)):
elif isinstance(photo, (UserProfilePhotoEmpty, ChatPhotoEmpty, PhotoEmpty, type(None))):
photo_id = ""
loc = None
else: