add to book reimplemented

This commit is contained in:
vabene1111
2021-01-14 01:21:15 +01:00
parent b271f81af2
commit 08733751aa
14 changed files with 193 additions and 35 deletions

View File

@@ -319,6 +319,12 @@ class RecipeBookEntry(models.Model):
def __str__(self):
return self.recipe.name
def get_owner(self):
try:
return self.book.created_by
except AttributeError:
return None
class Meta:
unique_together = (('recipe', 'book'),)