Fix(Fortune): We should check if event is a dict first

This commit is contained in:
2025-02-25 23:59:57 +08:00
parent 52d09db764
commit afff594e8b

View File

@@ -169,7 +169,11 @@ event_names = set()
event_dates = set()
def check_structure(event: dict, idx: int):
def check_structure(event, idx: int):
if not isinstance(event, dict):
errors[idx].append("should be a dict")
return False
if not require_field_check(
event,
idx,