Fix system AI flag bug
This commit is contained in:
@@ -73,7 +73,7 @@ async def update_system_ai_flags(system_id: str, body: AiFlagsBody):
|
||||
raise HTTPException(404, f"System '{system_id}' not found.")
|
||||
|
||||
current: dict = existing.get("ai_flags") or {}
|
||||
for field, value in body.model_dump(exclude_unset=False).items():
|
||||
for field, value in body.model_dump(exclude_unset=True).items():
|
||||
if value is None:
|
||||
current.pop(field, None) # clear override → inherit global
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user