Fixed __str__ of Pantry

This commit is contained in:
Jim Martens 2020-02-19 13:24:56 +01:00
parent f4506d8a7e
commit 5823abeee6
1 changed files with 2 additions and 3 deletions

View File

@ -139,9 +139,8 @@ class Pantry(models.Model):
ingredients = models.ManyToManyField(Ingredient, through='StoredIngredient')
def __str__(self):
return format_lazy('Pantry of {firstName} {lastName}',
firstName=self.owner.first_name,
lastName=self.owner.last_name)
return str.format('Pantry of {username}',
username=self.owner.username)
class StoredIngredient(models.Model):