Bugfix: When no form factor defined the all_tags() function errored out

This commit is contained in:
Johannes Schriewer 2025-01-06 03:16:00 +01:00
parent e9a50e1417
commit 8e13f99b2f

View file

@ -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", )