mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
add to book reimplemented
This commit is contained in:
@@ -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'),)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user