Skip to content

Commit 625402b

Browse files
committed
fix: The Policy API has changed origins and still requires Secure UI
Signed-off-by: Federico Barcelona <[email protected]>
1 parent 5d17fce commit 625402b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sdcclient/_secure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ def add_policy_json(self, policy_json):
719719

720720
try:
721721
policy_obj = json.loads(policy_json)
722+
if "origin" in policy_obj:
723+
del policy_obj["origin"]
722724
except Exception as e:
723725
return [False, "policy json is not valid json: {}".format(str(e))]
724726

@@ -786,6 +788,8 @@ def update_policy_json(self, policy_json):
786788
'''
787789
try:
788790
policy_obj = json.loads(policy_json)
791+
if "origin" in policy_obj:
792+
del policy_obj["origin"]
789793
except Exception as e:
790794
return [False, "policy json is not valid json: {}".format(str(e))]
791795

0 commit comments

Comments
 (0)