Fix song display in admin w/o uploader

This commit is contained in:
Daan Sprenkels
2017-11-03 18:18:46 +01:00
parent a437cdd632
commit d780fbad34
+4 -1
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>'