Skip to content

Commit

Permalink
Update extractors.py
Browse files Browse the repository at this point in the history
fix: 'NoneType' object has no attribute 'get' #2023
  • Loading branch information
OlivierPaquien authored Dec 20, 2024
1 parent 2e90c7d commit 9d416e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion instagrapi/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def extract_direct_thread(data):
item["thread_id"] = data["id"]
data["messages"].append(extract_direct_message(item))
data["users"] = [extract_user_short(u) for u in data["users"]]
if "inviter" in data:
if "inviter" in data and data["inviter"] is not None:
data["inviter"] = extract_user_short(data["inviter"])
data["left_users"] = data.get("left_users", [])
data["last_activity_at"] = datetime.datetime.fromtimestamp(
Expand Down

0 comments on commit 9d416e3

Please sign in to comment.