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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user