Skip to content

Commit

Permalink
fix #4585 avoid KeyError
Browse files Browse the repository at this point in the history
  • Loading branch information
joemull authored and mauromsl committed Jan 29, 2025
1 parent e3ca506 commit d56266b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/repository/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, *args, **kwargs):

# If using this form and there is an instance then this has
# previously been checked as it is required.
if self.instance:
if self.instance and 'submission_agreement' in self._meta.fields:
self.fields['submission_agreement'].initial = True

self.fields['subject'].queryset = models.Subject.objects.filter(
Expand Down

0 comments on commit d56266b

Please sign in to comment.