diff options
Diffstat (limited to 'sublab_project')
-rw-r--r-- | sublab_project/calendarium/admin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sublab_project/calendarium/admin.py b/sublab_project/calendarium/admin.py index 95d648c..608a66d 100644 --- a/sublab_project/calendarium/admin.py +++ b/sublab_project/calendarium/admin.py @@ -21,7 +21,7 @@ class EventAdmin(admin.ModelAdmin): def get_readonly_fields(self, request, obj=None): """Sets all fields read only if source is "import". """ - if obj.source == obj.SOURCE_IMPORT: + if obj and obj.source == obj.SOURCE_IMPORT: return ['name', 'description', 'start', 'end'] return [] |