Skip to content

Commit

Permalink
Support for selecting zero secondary feasts
Browse files Browse the repository at this point in the history
* Ok to not select any secondary feasts at all
* Ok to select the empty option
  • Loading branch information
jftsang committed Nov 18, 2023
1 parent a442fa8 commit 180257b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,9 @@ def items(self) -> List[PewSheetItem]:
def from_form(cls, form: 'PewSheetForm') -> 'Service':
primary_feast = Feast.get(slug=form.primary_feast.data)
if form.secondary_feasts.data:
secondary_feasts = [Feast.get(slug=slug) for slug in
form.secondary_feasts.data]
secondary_feasts = [Feast.get(slug=slug)
for slug in form.secondary_feasts.data
if slug]
else:
secondary_feasts = None

Expand Down

0 comments on commit 180257b

Please sign in to comment.