Fix #548: Mods can now change a library visibility through the admin UI

This commit is contained in:
Eliot Berriot 2019-07-25 14:14:44 +02:00
parent c885c10be1
commit 4d0fedab1f
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
5 changed files with 55 additions and 2 deletions

View file

@ -500,6 +500,15 @@ class ManageLibrarySerializer(serializers.ModelSerializer):
"followers_url",
"actor",
]
read_only_fields = [
"fid",
"uuid",
"id",
"url",
"domain",
"actor",
"creation_date",
]
def get_uploads_count(self, obj):
return getattr(obj, "_uploads_count", obj.uploads_count)