Fix that remove 'strategy' attribute does not work.
The 'strategy_id' attribute is the one that not exposes
to API. But the 'PATCH' API always update this attribute.
So this change does not work when choose 'remove' op.
This patch sets value for 'strategy_id' attribute.
Change-Id: I1597fb5d4985bb8271ad3cea7ea5f0adb7de65f4
Closes-Bug: #1662395
(cherry picked from commit e55c73be0e)
This commit is contained in:
@@ -333,6 +333,7 @@ class AuditTemplate(base.APIBase):
|
||||
|
||||
self.fields.append('goal_id')
|
||||
self.fields.append('strategy_id')
|
||||
setattr(self, 'strategy_id', kwargs.get('strategy_id', wtypes.Unset))
|
||||
|
||||
# goal_uuid & strategy_uuid are not part of
|
||||
# objects.AuditTemplate.fields because they're API-only attributes.
|
||||
|
||||
Reference in New Issue
Block a user