Skip to content

Commit

Permalink
fix: handle scripts properties changes
Browse files Browse the repository at this point in the history
Signed-off-by: iromli <[email protected]>
  • Loading branch information
iromli committed Apr 26, 2024
1 parent d68433a commit 28dcc08
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docker-jans-persistence-loader/scripts/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,7 @@ def update_scripts_entries(self):
else:
props = agama_entry.attrs["jansConfProperty"]

if self.backend.type != "couchbase":
# try converting to mapping
props = [json.loads(prop) for prop in props]
props = [json.loads(prop) for prop in props]

# filter out unwanted properties
new_props = [
Expand All @@ -380,8 +378,7 @@ def update_scripts_entries(self):
]

if new_props != props:
if self.backend.type != "couchbase":
new_props = [json.dumps(prop) for prop in new_props]
new_props = [json.dumps(prop) for prop in new_props]

if self.backend.type == "sql" and self.backend.client.dialect == "mysql":
agama_entry.attrs["jansConfProperty"]["v"] = new_props
Expand Down

0 comments on commit 28dcc08

Please sign in to comment.