repetitions and barsperrepeat fields on CRS and CDS accept invalid input #42

Closed
opened 2023-06-25 16:29:59 +02:00 by anselm · 7 comments
anselm commented 2023-06-25 16:29:59 +02:00 (Migrated from gitlab.anselms.net)

Sentry Issue: STRATHSPEY-Y

ValueError: invalid literal for int() with base 10: '2x40'
  File "django/db/models/fields/__init__.py", line 2055, in get_prep_value
    return int(value)

ValueError: Field 'repetitions' expected a number but got '2x40'.
(12 additional frame(s) were not displayed)
...
  File "ace4/db/views/search.py", line 409, in form_valid
    recordings = recordings.filter(**{key: reps})
Sentry Issue: [STRATHSPEY-Y](https://sentry.strathspey.org/organizations/strathspey/issues/33/?referrer=gitlab_integration) ``` ValueError: invalid literal for int() with base 10: '2x40' File "django/db/models/fields/__init__.py", line 2055, in get_prep_value return int(value) ValueError: Field 'repetitions' expected a number but got '2x40'. (12 additional frame(s) were not displayed) ... File "ace4/db/views/search.py", line 409, in form_valid recordings = recordings.filter(**{key: reps}) ```
anselm commented 2023-06-25 16:31:04 +02:00 (Migrated from gitlab.anselms.net)

assigned to @anselm

assigned to @anselm
anselm commented 2023-06-25 16:32:42 +02:00 (Migrated from gitlab.anselms.net)

We're tackling this by getting rid of the nerdy mathematical prefix operators (in favour of a dropdown menu) and changing the type of the input to number so the browser can do better validation (and the server too).

We're tackling this by getting rid of the nerdy mathematical prefix operators (in favour of a dropdown menu) and changing the type of the input to `number` so the browser can do better validation (and the server too).
anselm commented 2023-06-25 16:32:54 +02:00 (Migrated from gitlab.anselms.net)
created branch [`42-repetitions-and-barsperrepeat-fields-on-crs-and-cds-accept-invalid-input`](/strathspey/ace4/-/compare/main...42-repetitions-and-barsperrepeat-fields-on-crs-and-cds-accept-invalid-input) to address this issue
anselm commented 2023-06-25 16:33:31 +02:00 (Migrated from gitlab.anselms.net)

mentioned in merge request !16

mentioned in merge request !16
anselm commented 2023-06-26 00:09:36 +02:00 (Migrated from gitlab.anselms.net)

mentioned in commit 2847b507d4

mentioned in commit 2847b507d4cc20f14ca689d36f07dee0189983db
anselm (Migrated from gitlab.anselms.net) closed this issue 2023-06-26 00:09:36 +02:00
anselm commented 2023-07-01 19:15:11 +02:00 (Migrated from gitlab.anselms.net)

mentioned in merge request !17

mentioned in merge request !17
anselm commented 2023-07-01 19:17:11 +02:00 (Migrated from gitlab.anselms.net)

mentioned in commit f133162654

mentioned in commit f133162654345516627c8b19c3bbfa0332ba6827
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Strathspey/ace4#42
No description provided.