Added counters in api

This commit is contained in:
klmp200 committed 2016-08-07 20:45:06 +02:00
1 parent feb7b4689b
commit c2ccf63021
5 files changed
+52 -2

No files matched your search

+6
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