fix not updating bug

This commit is contained in:
Hayden
2021-01-03 14:34:00 -09:00
parent db30daceef
commit bc9e5692fa
2 changed files with 58 additions and 49 deletions

View File

@@ -125,9 +125,9 @@ class Recipe(BaseModel):
document.delete()
return "Document Deleted"
def update(self, _recipe_slug: str):
def update(self, recipe_slug: str):
""" Updates the recipe from the database by slug"""
document = RecipeDocument.objects.get(slug=self.slug)
document = RecipeDocument.objects.get(slug=recipe_slug)
if document:
document.update(set__name=self.name)