Do not allow staff modify song hash

This commit is contained in:
Daan Sprenkels
2018-11-23 14:41:27 +01:00
parent 78a66f7494
commit 6b8fdbab2e

View File

@ -14,3 +14,7 @@ class SongAdmin(admin.ModelAdmin):
return obj.user.name
except AttributeError:
return '<unknown>'
@staticmethod
def get_readonly_fields(request, obj=None):
return [] if request.user.is_superuser else ['hash']