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:
parent
8a5c5db9e0
commit
7833c4828b
9 changed files with 359 additions and 186 deletions
6
temp.py
Normal file
6
temp.py
Normal 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-"))
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue