Fixes broken channel page

This commit is contained in:
Marcos 2022-03-22 16:13:19 +01:00 committed by Georg Krause
commit 9528437242
12 changed files with 43 additions and 19 deletions

View file

@ -268,7 +268,7 @@ class ChannelSerializer(serializers.ModelSerializer):
return obj.actor.received_follows.exclude(approved=False).count()
def get_downloads_count(self, obj):
return getattr(obj, "_downloads_count", None)
return getattr(obj, "_downloads_count", None) or 0
def get_actor(self, obj):
if obj.attributed_to == actors.get_service_actor():