feat: allow interfaces to have no zone (shorewall '-' zone)

This commit is contained in:
2026-03-01 11:11:52 +01:00
parent 21d404229a
commit 58ef0dec63
5 changed files with 29 additions and 7 deletions

View File

@@ -64,7 +64,7 @@ class ZoneOut(BaseModel):
# --- Interface ---
class InterfaceCreate(BaseModel):
name: str
zone_id: int
zone_id: Optional[int] = None
options: str = ""
@@ -78,7 +78,7 @@ class InterfaceOut(BaseModel):
id: int
config_id: int
name: str
zone_id: int
zone_id: Optional[int]
options: str
model_config = {"from_attributes": True}