Skip to content

Commit

Permalink
Fix search_user method
Browse files Browse the repository at this point in the history
Fix search_user method returning no results.
  • Loading branch information
iSarabjitDhiman committed Jul 18, 2023
1 parent ac938e8 commit a49afed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metathreads/request_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def generate_request_data(endpoint, placeholder=None, params=None, additional_pa
key,values = additional_payload.popitem()
values = values[0] if isinstance(values,list) and len(values) == 1 else values
if isinstance(values,list):
additional_payload = [json.dumps(existing_payload | {key:str(each_item)}) if params else existing_payload | {key:str(each_item)} for each_item in values]
additional_payload = [existing_payload | {key:str(each_item)} if params else existing_payload | {key:str(each_item)} for each_item in values]
else:
additional_payload = json.dumps(existing_payload | {key:str(values)}) if params else existing_payload | {key:str(values)}
additional_payload = existing_payload | {key:str(values)} if params else existing_payload | {key:str(values)}
else:
additional_payload = json.dumps(params) if params else data or json_data if any([data,json_data]) else {}
data_key = "params" if params else "data" if data else "json" if json_data else None
Expand Down

0 comments on commit a49afed

Please sign in to comment.