PUT /panels/ carries a version and refuses a stale one with 409

The Panels dialog re-reads the list on 409. A panels.json without a
version reads as 0.
This commit is contained in:
2026-10-15 10:07:50 +02:00
parent 589ddecbb1
commit 43498037be
10 changed files with 108 additions and 10 deletions
+3
View File
@@ -96,6 +96,9 @@ class PanelsConfig(BaseModel):
"""Every panel this instance knows about."""
panels: list[PanelDef] = Field(default_factory=list)
#: Bumped on every save; a save based on an older one is refused, as a
#: dashboard's is. A file written before there was one reads as 0.
version: int = 0
#: Held across a read-modify-write of the panels file.