Fix `'NoneType' object has no attribute 'update'` when receiver params are not defined but a request contains data
When receiver doesn't have defined params, receiver.params gets None from the DB. After getting the receiver, senlin is trying to apply params for the request when they are defined. But `update` method doesn't work for None type. The solution is to set emtpy dictionary for receiver.params when they are not defined. Change-Id: Ib0fa9ca7c8bde8d6f6d15434ecacd80df4e91157 Closes-Bug: #1808988
This commit is contained in:
parent
29ed02378f
commit
c220ce0713
|
@ -2537,6 +2537,8 @@ class EngineService(service.Service):
|
|||
raise exception.BadRequest(msg=msg)
|
||||
|
||||
data = copy.deepcopy(receiver.params)
|
||||
if data is None:
|
||||
data = {}
|
||||
if params:
|
||||
data.update(params)
|
||||
|
||||
|
|
Loading…
Reference in New Issue