Closed pkcakeout closed 3 weeks ago
Thanks James!
I was on it already, but did not know why or how to get it working and wanted to call for help - and there it was already!
I was seeing this error in the logs:
postgres-1 | 2024-06-05 12:55:04.636 UTC [2547] ERROR: new row for relation "workstation_configs_windowpreset" violates check constraint "workstation_configs_windowpreset_either_fixed_or_percentile"
postgres-1 | 2024-06-05 12:55:04.636 UTC [2547] DETAIL: Failing row contains (64, foo, null, foo, 1, null, null, null).
postgres-1 | 2024-06-05 12:55:04.636 UTC [2547] STATEMENT: INSERT INTO "workstation_configs_windowpreset" ("title", "description", "slug", "width", "center", "lower_percentile", "upper_percentile") VALUES ('foo', NULL, 'foo', 1, NULL, NULL, NULL) RETURNING "workstation_configs_windowpreset"."id"
but maybe this was a red herring?
Will try your suggestion!
Adding "point_bounding_box_size_mm": "0",
to the posted data in the two tests or setting blank=True,
(and ensuring you handle None
s alongside 0
in your client code) would solve it.
Roger! Got it... I think. Allowed null
and blank
, this indeed did fix the tests!
Pitch https://github.com/DIAGNijmegen/rse-roadmap/issues/319
Open question: Does this need tests. It feels kind of silly to me to add tests for this, but maybe?