diff --git a/input/admin.py b/input/admin.py index 534097c..8620f0c 100755 --- a/input/admin.py +++ b/input/admin.py @@ -86,7 +86,7 @@ class ProjectAdminForm(BaseProjectForm): super().__init__(*args, **kwargs) for field, model in self.categories.items(): - if self.initial[f'{field}_other']: + if self.initial.get(f'{field}_other'): self.initial[field] = [*self.initial[field], model.other] def clean(self): @@ -195,6 +195,12 @@ class ProjectRequestAdmin(BaseProjectAdmin): class ProjectDeclinedAdmin(BaseProjectAdmin): granted = False + def has_add_permission(self, request): + return False + + def has_change_permission(self, request, obj=None): + return False + @admin.register(BusinessCard) class BusinessCardAdmin(RequestURLBeforeInternNotesMixin, admin.ModelAdmin):