Skip to content

Commit

Permalink
ft:method -- add delete method
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMwevi committed Jun 16, 2022
1 parent 63202e0 commit 23d05c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion businesses/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ def create_business(self):
self.save()
return self


@classmethod
def delete_business(cls, id):
business = cls.objects.get(id=id).delete()
return business



def __str__(self):
return self.name

0 comments on commit 23d05c8

Please sign in to comment.