Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User is allowed to enter an invalid exercise to a training day #1357

Closed
chanalv opened this issue Jun 14, 2023 · 1 comment · Fixed by #1477
Closed

User is allowed to enter an invalid exercise to a training day #1357

chanalv opened this issue Jun 14, 2023 · 1 comment · Fixed by #1477

Comments

@chanalv
Copy link

chanalv commented Jun 14, 2023

Steps to Reproduce

  1. When adding an exercise to a training day, leave the "Exercises" field blank or type in an invalid exercise that is not on the list of exercises.
  2. Click "Save".

Expected results:
I expected the "Exercises" field to be required and to be prevented from submitting the form.

Actual results:
The form is submitted despite the blank or invalid exercise entry and creates an anomalous exercise under the training day, as seen in the image below.

image

Additional notes:
This issue can be reproduced in both the live system on https://wger.de/ and when running a development build (Git SHA-1: aaa822e). I tried implementing a quick fix by making the "Exercises" field required, as shown in the image below. It successfully prevents the user from submitting a blank or invalid exercise entry, but I couldn't get an error message to appear and it failed two of the tests, which makes me curious if there's a functional reason for the field to remain optional?

image

@AggelosK26
Copy link

Hey, can I be assigned this issue?

@rolandgeider rolandgeider linked a pull request Oct 23, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants