Skip to content

Commit

Permalink
Merge pull request #1993 from laws-africa/commencement-form-tweak
Browse files Browse the repository at this point in the history
don't assume all_provisions is present in cleaned data
  • Loading branch information
goose-life authored Feb 21, 2024
2 parents afe7e95 + da04cb6 commit b11fb11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion indigo_app/forms/works.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,8 @@ def clean_all_provisions(self):

def clean(self):
super().clean()
if self.cleaned_data['all_provisions'] and self.cleaned_data['provisions']:
# all_provisions may have been nuked during clean
if self.cleaned_data.get('all_provisions') and self.cleaned_data['provisions']:
raise ValidationError("Cannot specify all provisions, and a list of provisions.")


Expand Down

0 comments on commit b11fb11

Please sign in to comment.