Skip to content

Commit

Permalink
Review default mutable arguments and ensure proper handling
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
cohenaj194 and coderabbitai[bot] authored Nov 15, 2024
1 parent abbf174 commit a7c6b05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/api_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ def get_ilvl_items(ilvl=201, item_ids=[]):
# if no item_ids are given, get all items at or above the given ilvl
# this gets weird when someone wants a high ilvl item as we have the base ilvl in the DB
# but not the max ilvl, so we just set it to 201
if len(item_ids) == 0:
if item_ids is None:
item_ids = []
if not item_ids:
ilvl = 201
json_data = {
"ilvl": ilvl,
Expand All @@ -161,6 +163,7 @@ def get_ilvl_items(ilvl=201, item_ids=[]):
results = requests.post(
f"{SADDLEBAG_URL}/api/wow/itemdata",

Check notice on line 164 in utils/api_requests.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

utils/api_requests.py#L164

Detected a request using 'http://'. This request will be unencrypted, and attackers could listen into traffic on the network and be able to obtain sensitive information.
json=json_data,
timeout=10,
).json()
except Exception as e:
print(f"Failed to get ilvl items getting backup from github: {e}")
Expand Down

0 comments on commit a7c6b05

Please sign in to comment.