diff options
author | asteroide <thomas.duval@orange.com> | 2017-04-28 15:22:15 +0200 |
---|---|---|
committer | asteroide <thomas.duval@orange.com> | 2017-04-28 15:22:15 +0200 |
commit | 6ca63399c475f534b9fa533f38e5642fc2122c44 (patch) | |
tree | 9ccefcef4f7cfb0957fdb3a70ea5697343cc4e5a /moonv4/moon_db | |
parent | f8c6b6b08acbfbf3b10f0ba4421129c78aded250 (diff) |
Fix a bug when saving a perimeter element
Change-Id: Ie274c020cb3f3a1776d10ca9850c5c424d693c5b
Diffstat (limited to 'moonv4/moon_db')
-rw-r--r-- | moonv4/moon_db/moon_db/backends/sql.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/moonv4/moon_db/moon_db/backends/sql.py b/moonv4/moon_db/moon_db/backends/sql.py index 69132116..5ab653a6 100644 --- a/moonv4/moon_db/moon_db/backends/sql.py +++ b/moonv4/moon_db/moon_db/backends/sql.py @@ -493,7 +493,7 @@ class PolicyConnector(BaseConnector, PolicyDriver): if "policy_list" not in _value["value"] or type(_value["value"]["policy_list"]) is not list: _value["value"]["policy_list"] = [] if policy_id and policy_id not in _value["value"]["policy_list"]: - _value["value"]["policy_list"] = [policy_id, ] + _value["value"]["policy_list"].append(policy_id) new_subject = Subject.from_dict(_value) # setattr(_subject, "value", _value["value"]) setattr(_subject, "value", getattr(new_subject, "value")) @@ -560,7 +560,7 @@ class PolicyConnector(BaseConnector, PolicyDriver): if "policy_list" not in _value["value"] or type(_value["value"]["policy_list"]) is not list: _value["value"]["policy_list"] = [] if policy_id and policy_id not in _value["value"]["policy_list"]: - _value["value"]["policy_list"] = [policy_id, ] + _value["value"]["policy_list"].append(policy_id) new_object = Object.from_dict(_value) # setattr(_object, "value", _value["value"]) setattr(_object, "value", getattr(new_object, "value")) @@ -627,7 +627,7 @@ class PolicyConnector(BaseConnector, PolicyDriver): if "policy_list" not in _value["value"] or type(_value["value"]["policy_list"]) is not list: _value["value"]["policy_list"] = [] if policy_id and policy_id not in _value["value"]["policy_list"]: - _value["value"]["policy_list"] = [policy_id, ] + _value["value"]["policy_list"].append(policy_id) new_action = Action.from_dict(_value) # setattr(_action, "value", _value["value"]) setattr(_action, "value", getattr(new_action, "value")) |