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:
parent
543494120c
commit
eddaa69158
5 changed files with 46 additions and 47 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue