Skip to content

Commit

Permalink
ft:update_occupants -- increases occupants count
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMwevi committed Jun 16, 2022
1 parent 3e5c6f3 commit 36da373
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions neighborhoods/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def update_neighborhood(cls, obj):
neighborhood.save()
return neighborhood

def update_occupants(self, occupants):
self.occupants += occupants
self.save()
return self

def __str__(self):
return self.location

0 comments on commit 36da373

Please sign in to comment.