Bugfix: When no form factor defined the all_tags() function errored out
This commit is contained in:
parent
e9a50e1417
commit
8e13f99b2f
1 changed files with 5 additions and 2 deletions
|
@ -28,7 +28,10 @@ class Item(CanBeContained):
|
|||
|
||||
@property
|
||||
def all_tags(self):
|
||||
return list(self.tags.all()) + list(self.form_factor.tags.all())
|
||||
if self.form_factor:
|
||||
return list(self.tags.all()) + list(self.form_factor.tags.all())
|
||||
else:
|
||||
return list(self.tags.all())
|
||||
|
||||
class Meta:
|
||||
ordering = ("name", )
|
||||
|
|
Loading…
Reference in a new issue