@@ -250,7 +250,7 @@ def get_organization(organization_id, current_user):
250250 raise http_exc
251251
252252 except Exception as e :
253- print (f "An error occurred: { e } " )
253+ print ("An error occurred: {}" . format ( e ) )
254254 raise HTTPException (status_code = 500 , detail = str (e ))
255255
256256
@@ -715,7 +715,7 @@ def delete_organization(org_id: str, current_user):
715715 # Return success response
716716 return {
717717 "status" : "success" ,
718- "message" : f "Organization { org_id } has been deleted successfully." ,
718+ "message" : "Organization {} has been deleted successfully." . format ( org_id ) ,
719719 }
720720
721721 except HTTPException as http_exc :
@@ -1064,7 +1064,7 @@ def search_organizations_task(search_body, current_user: User):
10641064 # Use match_all if searchTerm is empty
10651065 if search_body .searchTerm .strip ():
10661066 query_body ["query" ]["bool" ]["must" ].append (
1067- {"wildcard" : {"name" : f "*{ search_body . searchTerm } *" }}
1067+ {"wildcard" : {"name" : "*{}*" . format ( search_body . searchTerm ) }}
10681068 )
10691069 else :
10701070 query_body ["query" ]["bool" ]["must" ].append ({"match_all" : {}})
@@ -1076,7 +1076,7 @@ def search_organizations_task(search_body, current_user: User):
10761076 )
10771077
10781078 # Log the query for debugging
1079- print (f "Query body: { query_body } " )
1079+ print ("Query body: {}" . format ( query_body ) )
10801080
10811081 # Execute the search
10821082 search_results = client .search_organizations (query_body )
0 commit comments