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

Speed limit by tag can be left blank which is not valid #6439

Closed
flomonster opened this issue Jan 25, 2024 · 0 comments
Closed

Speed limit by tag can be left blank which is not valid #6439

flomonster opened this issue Jan 25, 2024 · 0 comments
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:infra-editor Infra Edition severity:minor Minor severity bug

Comments

@flomonster
Copy link
Contributor

What happened?

When editing a speed section. We can leave empty a composition code and save the object. This results in a 400 error since it's not a valid speed limit.

image

What did you expect to happen?

  • We should be able to save the object
  • The field should be red (as invalid)

How can we reproduce it (as minimally and precisely as possible)?

  1. Go to editor
  2. Create a new speed section
  3. Add a composition limit
  4. Set a speed with an empty composition
  5. Save the object

What operating system, browser and environment are you using?

  • Browser: Firefox v109
  • OS: Nixos v22.11
  • Env: Local

OSRD version (top right corner Account button > Informations)

3650cc6

@flomonster flomonster added kind:bug Something isn't working area:front Work on Standard OSRD Interface modules severity:minor Minor severity bug module:infra-editor Infra Edition labels Jan 25, 2024
@flomonster flomonster changed the title Speed limit by tag can be left empty which is not valid Speed limit by tag can be left blank which is not valid Jan 25, 2024
@jacomyal jacomyal self-assigned this Jan 25, 2024
jacomyal added a commit that referenced this issue Jan 25, 2024
Details:
- Adds the required attribute to the composition code input so that it
  is red when empty
- Adds a canSave optional function to rangeEdition/tool-factory, to
  allow disabling the save button when state is not correct
- Uses the new canSave function in SpeedEditionTool to disable the save
  button when there are empty composition codes
github-merge-queue bot pushed a commit that referenced this issue Jan 25, 2024
Details:
- Adds the required attribute to the composition code input so that it
  is red when empty
- Adds a canSave optional function to rangeEdition/tool-factory, to
  allow disabling the save button when state is not correct
- Uses the new canSave function in SpeedEditionTool to disable the save
  button when there are empty composition codes
louisgreiner pushed a commit that referenced this issue Jan 30, 2024
Details:
- Adds the required attribute to the composition code input so that it
  is red when empty
- Adds a canSave optional function to rangeEdition/tool-factory, to
  allow disabling the save button when state is not correct
- Uses the new canSave function in SpeedEditionTool to disable the save
  button when there are empty composition codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:infra-editor Infra Edition severity:minor Minor severity bug
Projects
None yet
Development

No branches or pull requests

2 participants