Update queue metadata failed when the original value is zero.
Such as the problem, the current set or update the queue of metadata, it may fail. The reproduction steps are as follows: - Set or update the metadata to 0 (some metadata can be zero). - And then update it again will fail (always 0), because 0 was filter by client. Closes-Bug: #1729193 Change-Id: I4e3c4aa3634ba33e4e9501c6c27bac77c0e43ea8
This commit is contained in:
parent
05dd0f65cc
commit
cbfc28fa48
|
@ -62,7 +62,7 @@ class Queue(queues.Queue):
|
|||
changes = []
|
||||
for key, value in new_meta.items():
|
||||
# If key exists, replace it's value.
|
||||
if self._metadata.get(key, None):
|
||||
if self._metadata.get(key, None) is not None:
|
||||
changes.append({'op': 'replace',
|
||||
'path': '/metadata/%s' % key,
|
||||
'value': value})
|
||||
|
|
Loading…
Reference in New Issue