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

Edit a track section fails #4171

Closed
flomonster opened this issue May 23, 2023 · 0 comments · Fixed by #4305
Closed

Edit a track section fails #4171

flomonster opened this issue May 23, 2023 · 0 comments · Fixed by #4305
Assignees
Labels
area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:infra-editor Infra Edition severity:major Major severity bug

Comments

@flomonster
Copy link
Contributor

What happened?

When trying to edit any field of a track section the update fails.

The request payload looks like this:

[
  {
    "operation_type": "UPDATE",
    "obj_id": "osrd/editor/new-signal-id", # <--- This is wrong it should be the current track id
    "obj_type": "TrackSection",
    "railjson_patch": [
      ...
    ]
  }
]

Note: Editoast shouldn't fail with a 500. We should be able to detect an invalid id. To do so we need to check the response of this query: https://github.com/DGEXSolutions/osrd/blob/c8a1770ca54769c13e51c60931707d364e1ec781/editoast/src/schema/operation/update.rs#L24-L30

What did you expect to happen?

No response

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

  1. Go to the editor
  2. Select a track section
  3. Edit your selection
  4. Try to save the object
  5. An error 500 happen

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)

c8a1770

@flomonster flomonster added kind:bug Something isn't working area:front Work on Standard OSRD Interface modules module:infra-editor Infra Edition severity:major Major severity bug area:editoast Work on Editoast Service labels May 23, 2023
@Castavo Castavo self-assigned this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:infra-editor Infra Edition severity:major Major severity bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants