mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 22:32:04 +00:00
feat(labs): refuse a biomarker unit change while readings are linked
Readers label every linked reading with the marker's unit, so changing
it relabelled stored numbers without converting them. PUT
/api/biomarkers/{id} now answers 422 biomarkers.unit.locked with
meta.readingCount when the unit differs and any reading (tombstoned
ones included) is linked. The marker editor says so under the unit
field.
This commit is contained in:
1 parent
7022b698e7
commit
dd7636e147
6 files changed
+143
-27
No files matched your search
@@ -76,6 +76,7 @@ export const ERROR_CODE_CATALOGUE: Readonly<Record<string, readonly string[]>> =
|
||||
"backup.section.missing",
|
||||
"backup.upload.too_large",
|
||||
],
|
||||
biomarkers: ["biomarkers.unit.locked"],
|
||||
"body-site": ["body-site.invalid"],
|
||||
coach: [
|
||||
"coach.budget.exceeded",
|
||||
|
||||
Reference in new issue
Block a user