Skip to content

Commit

Permalink
fix: empty field attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Dec 28, 2021
1 parent 982616d commit 2177e26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bread/views/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def get_form_class(self, form=forms.models.ModelForm):

def get_layout(self):
formfields = filter_fieldlist(
self.model, [f for f in self.fields if isinstance(f, str)], for_form=True
self.model,
[f for f in self.fields if isinstance(f, str)] if self.fields else None,
for_form=True,
)
ret = hg.BaseElement()
for field in self.fields or formfields:
Expand Down

0 comments on commit 2177e26

Please sign in to comment.