Skip to content

Commit

Permalink
Use get_keycloak_url in utils.py to build the correct base url
Browse files Browse the repository at this point in the history
  • Loading branch information
Wambere committed Aug 23, 2024
1 parent 5a78668 commit ef2a985
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions importer/importer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
import click

from importer.builder import get_base_url
from importer.config.settings import fhir_base_url, keycloak_url
from importer.config.settings import fhir_base_url
from importer.request import post_request
from importer.users import get_keycloak_url


# This function takes in a csv file
Expand Down Expand Up @@ -332,8 +333,9 @@ def clean_duplicates(users, cascade_delete):
for user in users:
# get keycloak user uuid
username = str(user[2].strip())
_keycloak_url = get_keycloak_url()
user_details = handle_request(
"GET", "", keycloak_url + "/users?exact=true&username=" + username
"GET", "", _keycloak_url + "/users?exact=true&username=" + username
)
obj = json.loads(user_details[0])
keycloak_uuid = obj[0]["id"]
Expand Down

0 comments on commit ef2a985

Please sign in to comment.