Fix getting update params
Change-Id: I0724417cfe974c23813117cf3733de89f8f5f1c5
This commit is contained in:
parent
d768711939
commit
13e2d13195
|
@ -198,8 +198,8 @@ class FunctionsController(rest.RestController):
|
|||
"""
|
||||
values = {}
|
||||
for key in UPDATE_ALLOWED:
|
||||
if key in func.to_dict():
|
||||
values.update({key: func.to_dict().get(key)})
|
||||
if func.to_dict().get(key) is not None:
|
||||
values.update({key: func.to_dict()[key]})
|
||||
|
||||
LOG.info('Update resource, params: %s', values,
|
||||
resource={'type': self.type, 'id': id})
|
||||
|
|
|
@ -125,8 +125,8 @@ class JobsController(rest.RestController):
|
|||
"""
|
||||
values = {}
|
||||
for key in UPDATE_ALLOWED:
|
||||
if key in job.to_dict():
|
||||
values.update({key: job.to_dict().get(key)})
|
||||
if job.to_dict().get(key) is not None:
|
||||
values.update({key: job.to_dict()[key]})
|
||||
|
||||
LOG.info('Update resource, params: %s', values,
|
||||
resource={'type': self.type, 'id': id})
|
||||
|
|
|
@ -113,8 +113,8 @@ class RuntimesController(rest.RestController):
|
|||
"""
|
||||
values = {}
|
||||
for key in UPDATE_ALLOWED:
|
||||
if key in runtime.to_dict():
|
||||
values.update({key: runtime.to_dict().get(key)})
|
||||
if runtime.to_dict().get(key) is not None:
|
||||
values.update({key: runtime.to_dict()[key]})
|
||||
|
||||
LOG.info('Update resource, params: %s', values,
|
||||
resource={'type': self.type, 'id': id})
|
||||
|
|
Loading…
Reference in New Issue