Merge "Removed default values on rating modules"
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user