library policy activation to accept item as {}
For activation of library policy , currently item is expected to passed only as None, but when querying through client None is not accepted as valid json type, so will be passed as empty dict, so this commit allows server to accept and validate accordingly. Change-Id: I9d038dd4c33ed509261f6b404ab278bd33318d3b
This commit is contained in:
parent
4c4fcb300f
commit
c799988bca
|
@ -90,10 +90,10 @@ class PolicyModel(base.APIModel):
|
|||
"""
|
||||
# case 1: parameter gives library policy UUID
|
||||
if 'library_policy' in params:
|
||||
if item is not None:
|
||||
if item:
|
||||
raise exception.BadRequest(
|
||||
'Policy creation reqest with `library_policy` parameter '
|
||||
'must not have body.')
|
||||
'Policy creation request with `library_policy` parameter '
|
||||
'must not have non-empty body.')
|
||||
try:
|
||||
# Note(thread-safety): blocking call
|
||||
library_policy_object = self.invoke_rpc(
|
||||
|
|
Loading…
Reference in New Issue