Implement sync_from_state methods for Area, Brand, Item, RoomFunction, and Room models; enhance entity management and foreign key resolution in settings

This commit is contained in:
Yaro Kasear 2025-06-25 09:31:05 -05:00
parent 8a5c5db9e0
commit 7833c4828b
9 changed files with 359 additions and 186 deletions

6
temp.py Normal file
View file

@ -0,0 +1,6 @@
def is_temp_id(val):
return (
val is None or
(isinstance(val, int) and val < 0) or
(isinstance(val, str) and val.startswith("temp-"))
)