Fixes broken channel page
This commit is contained in:
parent
44e07b5fbd
commit
9528437242
12 changed files with 43 additions and 19 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue