mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-01 21:09:35 +00:00
Fix settings crash when upgrading: make datasheetAsPdf nullable
The settings bundle stores values in the database. When upgrading from a version without datasheetAsPdf, the stored JSON lacks this key, causing a TypeError when assigning null to a non-nullable bool. Making it nullable with a fallback in KiCadHelper fixes the upgrade path.
This commit is contained in:
parent
67c0b02248
commit
9de176e455
2 changed files with 2 additions and 2 deletions
|
|
@ -47,5 +47,5 @@ class KiCadEDASettings
|
|||
#[SettingsParameter(label: new TM("settings.misc.kicad_eda.datasheet_link"),
|
||||
description: new TM("settings.misc.kicad_eda.datasheet_link.help"),
|
||||
envVar: "bool:EDA_KICAD_DATASHEET_AS_PDF", envVarMode: EnvVarMode::OVERWRITE)]
|
||||
public bool $datasheetAsPdf = true;
|
||||
public ?bool $datasheetAsPdf = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue