Remove action_update interface
Remove direct update logic from db to avoid out-of-band action status changes.
This commit is contained in:
parent
5584b749fc
commit
af4c7b6993
@ -279,10 +279,6 @@ def action_start_work_on(context, action_id, owner):
|
||||
return IMPL.action_start_work_on(context, action_id, owner)
|
||||
|
||||
|
||||
def action_update(context, action_id, values):
|
||||
return IMPL.action_update(context, action_id, values)
|
||||
|
||||
|
||||
def db_sync(engine, version=None):
|
||||
"""Migrate the database to `version` or the most recent version."""
|
||||
return IMPL.db_sync(engine, version=version)
|
||||
|
@ -793,17 +793,6 @@ def action_start_work_on(context, action_id, owner):
|
||||
return action
|
||||
|
||||
|
||||
def action_update(context, action_id, values):
|
||||
#TODO(liuh):Need check if 'status' is being updated?
|
||||
action = model_query(context, models.Action).get(action_id)
|
||||
if not action:
|
||||
raise exception.NotFound(
|
||||
_('Action with id "%s" not found') % action_id)
|
||||
|
||||
action.update(values)
|
||||
action.save(_session(context))
|
||||
return action
|
||||
|
||||
# Utils
|
||||
def db_sync(engine, version=None):
|
||||
"""Migrate the database to `version` or the most recent version."""
|
||||
|
Loading…
Reference in New Issue
Block a user