Fix song display in admin w/o uploader

This commit is contained in:
Daan Sprenkels
2017-11-03 18:09:12 +01:00
parent a437cdd632
commit d780fbad34

View File

@ -10,4 +10,7 @@ class SongAdmin(admin.ModelAdmin):
@staticmethod
def user_name(obj):
return obj.user.name
try:
return obj.user.name
except AttributeError:
return '<unknown>'