Merge "Removed default values on rating modules"

This commit is contained in:
Jenkins
2015-09-16 09:36:02 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -97,9 +97,9 @@ class ModulesController(rest.RestController):
ext = self.extensions[module_id].obj
except KeyError:
pecan.abort(404, 'Module not found.')
if ext.enabled != module.enabled:
if module.enabled != wtypes.Unset and ext.enabled != module.enabled:
ext.set_state(module.enabled)
if ext.priority != module.priority:
if module.priority != wtypes.Unset and ext.priority != module.priority:
ext.set_priority(module.priority)
pecan.response.location = pecan.request.path

View File

@@ -79,13 +79,13 @@ class CloudkittyModule(wtypes.Base):
description = wtypes.wsattr(wtypes.text, mandatory=False)
"""Short description of the extension."""
enabled = wtypes.wsattr(bool, default=False)
enabled = wtypes.wsattr(bool)
"""Extension status."""
hot_config = wtypes.wsattr(bool, default=False, name='hot-config')
"""On-the-fly configuration support."""
priority = wtypes.wsattr(int, default=1)
priority = wtypes.wsattr(int)
"""Priority of the extension."""
@classmethod