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

front: fix deleted trainrun #8689

Merged
merged 1 commit into from
Sep 3, 2024
Merged

front: fix deleted trainrun #8689

merged 1 commit into from
Sep 3, 2024

Conversation

Uriel-Sautron
Copy link
Contributor

When deleting trainrun skips getTrainrunSectionsByTrainrunId function, as this function searches for sections according to trainrun id.
When deleting a trainrun, no sections are found which returns an error and cancels the deletion.

close #8688

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 36.81%. Comparing base (0164594) to head (2fe634f).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...ationalStudies/components/MacroEditor/ngeToOsrd.ts 0.00% 9 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #8689      +/-   ##
============================================
- Coverage     36.82%   36.81%   -0.02%     
  Complexity     2213     2213              
============================================
  Files          1254     1254              
  Lines        113698   113706       +8     
  Branches       3185     3185              
============================================
- Hits          41866    41857       -9     
- Misses        69940    69957      +17     
  Partials       1892     1892              
Flag Coverage Δ
core 74.75% <ø> (ø)
editoast 71.79% <ø> (-0.04%) ⬇️
front 14.92% <0.00%> (-0.01%) ⬇️
gateway 2.20% <ø> (ø)
osrdyne 2.71% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(I wouldn't mind duplicating the getTrainrunSectionsByTrainrunId() call in both cases FWIW, or even moving that call into createTrainSchedulePayload())

@Uriel-Sautron
Copy link
Contributor Author

Uriel-Sautron commented Sep 2, 2024

LGTM

(I wouldn't mind duplicating the getTrainrunSectionsByTrainrunId() call in both cases FWIW, or even moving that call into createTrainSchedulePayload())

I've also considered doing it.

@Uriel-Sautron Uriel-Sautron force-pushed the usn/fix-deleted-trainrun branch 2 times, most recently from becacae to 7bbb177 Compare September 2, 2024 15:08
Copy link
Contributor

@kmer2016 kmer2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and tested

Copy link
Contributor

@louisgreiner louisgreiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working fine, thanks :)

  - when deleting trainrun skips getTrainrunSectionsByTrainrunId function

  - rebase dev
@Uriel-Sautron Uriel-Sautron force-pushed the usn/fix-deleted-trainrun branch from ea2cd41 to 2fe634f Compare September 3, 2024 14:52
@Uriel-Sautron Uriel-Sautron added this pull request to the merge queue Sep 3, 2024
Merged via the queue into dev with commit e636078 Sep 3, 2024
22 checks passed
@Uriel-Sautron Uriel-Sautron deleted the usn/fix-deleted-trainrun branch September 3, 2024 15:12
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 this pull request may close these issues.

NGE: deleting a trainrun doesn't delete the corresponding trainSchedule
5 participants