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

feat: Make all order relationships read only #7090

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

iamareebjamal
Copy link
Member

@iamareebjamal iamareebjamal commented Jun 29, 2020

There is absolutely no reason to allow changes in order relationships and those were previously disallowed via custom logic. But for some reason, SQLAlchemy was failing with Unhashable type: 'dict' when saving custom forms JSON in attendee (working) and then saving the order (throwing) either due to a bug in SQLAlchemy or flask-rest-jsonapi (more likely). So now, we have made order relationships read only so that none of the related items are saved needlessly on PATCH request

@auto-label auto-label bot added the feature label Jun 29, 2020
@niranjan94
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ tests/all/integration/api/helpers/order/test_edit_order.py  -1
         

See the complete overview on Codacy

@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

Merging #7090 into development will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #7090      +/-   ##
===============================================
+ Coverage        61.99%   62.00%   +0.01%     
===============================================
  Files              262      262              
  Lines            12992    12992              
===============================================
+ Hits              8054     8056       +2     
+ Misses            4938     4936       -2     
Impacted Files Coverage Δ
app/api/schema/orders.py 96.87% <ø> (ø)
app/api/orders.py 39.26% <0.00%> (-0.53%) ⬇️
app/api/helpers/permission_manager.py 36.49% <0.00%> (+0.70%) ⬆️
app/models/user.py 60.29% <0.00%> (+0.74%) ⬆️

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 3a22dff...284ab3e. Read the comment docs.

@iamareebjamal iamareebjamal merged commit 9a38212 into development Jun 29, 2020
@iamareebjamal iamareebjamal deleted the order/relationship-readonly branch June 29, 2020 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants