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

@ -46,12 +46,7 @@ class Room(db.Model):
}
@classmethod
def sync_from_state(
cls,
submitted_rooms: list[dict],
section_map: dict[int, int],
function_map: dict[int, int]
):
def sync_from_state(cls, submitted_rooms: list[dict], section_map: dict[str, int], function_map: dict[str, int]) -> None:
"""
Syncs the Rooms table with the submitted room list.
Resolves foreign keys using section_map and function_map.