commit | ed0d1b673566f2b5e0c4f5c6e888e5743a2b04c3 | [log] [tgz] |
---|---|---|
author | Scott Baker <smbaker@gmail.com> | Mon May 13 22:27:47 2013 -0700 |
committer | Scott Baker <smbaker@gmail.com> | Mon May 13 22:27:47 2013 -0700 |
tree | 8ef88b4642852daf101a528b3308315930481da6 | |
parent | fcd688fc5de82733ff07247c12d59a1b0e870536 [diff] [blame] |
Method for getting the default service class
diff --git a/planetstack/core/models/serviceclass.py b/planetstack/core/models/serviceclass.py index 1f9fc58..aa6b75d 100644 --- a/planetstack/core/models/serviceclass.py +++ b/planetstack/core/models/serviceclass.py
@@ -20,3 +20,11 @@ def __unicode__(self): return u'%s' % (self.name) + @staticmethod + def get_default(): + try: + return ServiceClass.objects.get(name="Best Effort") + except ServiceClass.DoesNotExist: + return None + +