aboutsummaryrefslogtreecommitdiffstats
path: root/servo/models/common.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2017-01-19 18:14:31 +0200
committerFilipp Lepalaan <filipp@mac.com>2017-01-19 18:14:31 +0200
commit9fcb963e76d06ca4f659bc052bb46c3d50f155ce (patch)
treee8a3a1a533cbfe13ce34caa1d710e37869d7f080 /servo/models/common.py
parent28f4a5677b8f485224ef7df675228ccf657dcb75 (diff)
downloadServo-9fcb963e76d06ca4f659bc052bb46c3d50f155ce.tar.gz
Servo-9fcb963e76d06ca4f659bc052bb46c3d50f155ce.tar.bz2
Servo-9fcb963e76d06ca4f659bc052bb46c3d50f155ce.zip
Added checkin_enable setting
Diffstat (limited to 'servo/models/common.py')
-rw-r--r--servo/models/common.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/servo/models/common.py b/servo/models/common.py
index 1f9af7c..b2b6c51 100644
--- a/servo/models/common.py
+++ b/servo/models/common.py
@@ -497,6 +497,7 @@ class Location(models.Model):
@classmethod
def get_checkin_list(cls):
+ """List service locations that are marked for check-in."""
results = []
for l in cls.objects.filter(checkin=True):
results.append({'pk': l.pk, 'name': l.title})
@@ -651,6 +652,10 @@ class Configuration(models.Model):
return config.get(key) if key else config
+ @classmethod
+ def checkin_enabled(cls):
+ return cls.conf('checkin_enable')
+
def save(self, *args, **kwargs):
config = super(Configuration, self).save(*args, **kwargs)
# Using cache instead of session since it's shared among