Added counters in api

This commit is contained in:
2016-08-05 20:01:23 +02:00
parent feb7b4689b
commit c2ccf63021
5 changed files with 52 additions and 2 deletions

View File

@ -189,6 +189,12 @@ class Counter(models.Model):
bl = Counter.get_barmen_list(counter_id)
return bl[randrange(0, len(bl))]
def is_open(self):
response = False
if len(Counter.get_barmen_list(self.id)) > 0:
response = True
return response
class Refilling(models.Model):
"""
Handle the refilling