Support tower license within the database

With backwards support for the file-based license
This commit is contained in:
Matthew Jones
2015-12-16 11:21:52 -05:00
parent 35b19bf220
commit 9db80bd9fc
5 changed files with 22 additions and 8 deletions

View File

@@ -54,6 +54,8 @@ class TowerSettings(CreatedModifiedModel):
converted_type = [x.strip() for x in self.value.split(',')]
elif self.value_type == 'bool':
converted_type = self.value in [True, "true", "True", 1, "1", "yes"]
elif self.value_type == 'string':
converted_type = self.value
else:
t = __builtins__[self.value_type]
converted_type = t(self.value)