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

editoast: add model update trait #3631

Merged
merged 1 commit into from
Mar 22, 2023
Merged

editoast: add model update trait #3631

merged 1 commit into from
Mar 22, 2023

Conversation

flomonster
Copy link
Contributor

close #3603

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #3631 (b4f88ee) into dev (2001e9c) will decrease coverage by 0.07%.
The diff coverage is 45.16%.

❗ Current head b4f88ee differs from pull request most recent head b2bf66d. Consider uploading reports for the commit b2bf66d to get more accurate results

@@             Coverage Diff              @@
##                dev    #3631      +/-   ##
============================================
- Coverage     68.25%   68.19%   -0.07%     
  Complexity     1917     1917              
============================================
  Files           421      421              
  Lines         21279    21285       +6     
  Branches       1555     1555              
============================================
- Hits          14525    14516       -9     
- Misses         6021     6036      +15     
  Partials        733      733              
Flag Coverage Δ
editoast 74.62% <45.16%> (-0.40%) ⬇️

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

Impacted Files Coverage Δ
editoast/src/models/mod.rs 25.00% <0.00%> (-8.34%) ⬇️
editoast/src/models/projects.rs 64.28% <0.00%> (-17.54%) ⬇️
editoast/src/models/study.rs 92.30% <ø> (+5.94%) ⬆️
editoast/src/views/study.rs 92.94% <100.00%> (-0.17%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@flomonster flomonster marked this pull request as ready for review March 22, 2023 13:01
@flomonster flomonster requested a review from a team as a code owner March 22, 2023 13:01
@flomonster flomonster force-pushed the fam/models-update-trait branch 2 times, most recently from 00c9ed8 to b4f88ee Compare March 22, 2023 14:54
Copy link
Contributor

@multun multun left a comment

Choose a reason for hiding this comment

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

I don't see any way of restricting what fields can be updated: updating id, or other fks, might break the app
EDIT: my bad

editoast/src/models/study.rs Outdated Show resolved Hide resolved
@flomonster flomonster merged commit 4cd219e into dev Mar 22, 2023
@flomonster flomonster deleted the fam/models-update-trait branch March 22, 2023 16:08
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.

Refactor models update function using a Trait and a derivative macro
4 participants