Refactor sync_from_state method in Room model; update parameter types for section_map and function_map to improve clarity and consistency

This commit is contained in:
Yaro Kasear 2025-06-25 11:34:45 -05:00
parent 543494120c
commit eddaa69158
5 changed files with 46 additions and 47 deletions

View file

@ -50,9 +50,10 @@ class Area(db.Model):
# Record real (non-temp) IDs
try:
parsed_id = int(raw_id)
if parsed_id >= 0:
seen_ids.add(parsed_id)
if raw_id is not None:
parsed_id = int(raw_id)
if parsed_id >= 0:
seen_ids.add(parsed_id)
except (ValueError, TypeError):
pass