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

fix: throw validation error when updating models with misconfigured h… #886

Merged
merged 3 commits into from
Jan 19, 2023

Conversation

bombguy
Copy link
Contributor

@bombguy bombguy commented Jan 18, 2023

Updated behavior to throw before making DataStore calls when unlinking child model of hasMany relationship when the linking field is set as required.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2023

Codecov Report

Merging #886 (506fbb6) into main (b90e191) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #886      +/-   ##
==========================================
+ Coverage   92.96%   92.97%   +0.01%     
==========================================
  Files         117      117              
  Lines        4974     4982       +8     
  Branches     1446     1448       +2     
==========================================
+ Hits         4624     4632       +8     
  Misses        329      329              
  Partials       21       21              
Impacted Files Coverage Δ
...-react/lib/forms/form-renderer-helper/cta-props.ts 100.00% <100.00%> (ø)
...react/lib/forms/form-renderer-helper/form-state.ts 98.84% <100.00%> (+<0.01%) ⬆️
...act/lib/forms/form-renderer-helper/relationship.ts 90.83% <100.00%> (ø)
.../codegen-ui-react/lib/forms/react-form-renderer.ts 95.85% <100.00%> (+0.04%) ⬆️
packages/codegen-ui-react/lib/helpers/index.ts 100.00% <100.00%> (ø)
packages/codegen-ui/lib/generic-from-datastore.ts 98.88% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b90e191...506fbb6. Read the comment docs.

@bombguy bombguy requested review from hein-j and Jshhhh January 18, 2023 22:39
@bombguy bombguy marked this pull request as ready for review January 19, 2023 17:34
@bombguy bombguy requested a review from a team as a code owner January 19, 2023 17:34
@bombguy bombguy merged commit ac80c9c into main Jan 19, 2023
@bombguy bombguy deleted the cshin/misconfigured-hasMany-relationship branch January 19, 2023 18:55
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.

4 participants