Skip to content

Commit

Permalink
Fix a few warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
baszoetekouw committed Jun 4, 2024
1 parent 12ef24d commit 8b9675a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions server/api/scim.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ def sweep():
results["scim_url"] = service.scim_url
return results, 201
except BadRequest as bad_request:
logger.warn(f"Error from remote SCIM server for {service.entity_id}: {bad_request.description}")
logger.warning(f"Error from remote SCIM server for {service.entity_id}: {bad_request.description}")
return {"error": f"Error from remote scim server: {bad_request.description}",
"scim_url": service.scim_url}, 400
except requests.RequestException as request_exception:
logger.warn(f"Could not connect to remote SCIM server {service.scim_url} for {service.entity_id}:"
f" {type(request_exception).__name__}")
logger.warning(f"Could not connect to remote SCIM server {service.scim_url} for {service.entity_id}:"
f" {type(request_exception).__name__}")
return {"error": f"Could not connect to remote SCIM server ({type(request_exception).__name__})"
f"{': ' + request_exception.response.text if request_exception.response else ''}",
"scim_url": service.scim_url}, 400
Expand Down
2 changes: 1 addition & 1 deletion server/api/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def trust_organisation(service_id, organisation_id):
@json_endpoint
def request_delete_service(service_id):
confirm_service_admin(service_id)
service = Service.query.get(service_id)
service = db.session.get(Service, service_id)
mail_delete_service_request(service)
return {}, 204

Expand Down

0 comments on commit 8b9675a

Please sign in to comment.