Skip to content

Commit

Permalink
fix: errors adding/upgrading data into couchbase persistence (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
iromli authored Apr 19, 2022
1 parent 8def41a commit db71324
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docker-jans-persistence-loader/scripts/couchbase_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ def get_bucket_for_key(key):
bucket = f"{bucket_prefix}_user"
elif key_prefix in ("site_", "cache-refresh_"):
bucket = f"{bucket_prefix}_site"
elif key_prefix in ("tokens_"):
elif key_prefix in ("tokens_",):
bucket = f"{bucket_prefix}_token"
elif key_prefix in ("cache_"):
elif key_prefix in ("cache_",):
bucket = f"{bucket_prefix}_cache"
else:
bucket = bucket_prefix
Expand Down
5 changes: 4 additions & 1 deletion docker-jans-persistence-loader/scripts/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,10 @@ def update_admin_ui_config(self):
break

# current permissions
current_role_mapping = json.loads(entry.attrs["jansConfDyn"])
try:
current_role_mapping = json.loads(entry.attrs["jansConfDyn"])
except TypeError:
current_role_mapping = entry.attrs["jansConfDyn"]
should_update = False

for i, api_role in enumerate(current_role_mapping["rolePermissionMapping"]):
Expand Down

0 comments on commit db71324

Please sign in to comment.