This commit is contained in:
smilerz
2021-10-28 12:05:29 -05:00
parent 7c6a7ef6a4
commit 27f358dd03
3 changed files with 3 additions and 3 deletions

View File

@@ -826,7 +826,7 @@ class ShoppingListRecipe(ExportModelOperationsMixin('shopping_list_recipe'), mod
def get_owner(self):
try:
return self.entries.first().created_by or self.shoppinglist_set.first().created_by
return getattr(self.entries.first(), 'created_by', None) or getattr(self.shoppinglist_set.first(), 'created_by', None)
except AttributeError:
return None