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

Update forward relation fields in the admin to be raw id fields #1031

Merged
merged 4 commits into from
Oct 14, 2019

Conversation

ryancausey
Copy link
Contributor

Fixes issue I found where some foreign key fields were not raw ID fields, potentially causing giant select widgets to be rendered in the admin.

The utility function used should automatically catch when new forward relations are added to models, and ensure those are rendered as raw id fields in the admin.

@codecov
Copy link

codecov bot commented Oct 13, 2019

Codecov Report

Merging #1031 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1031   +/-   ##
=======================================
  Coverage   97.52%   97.52%           
=======================================
  Files          25       25           
  Lines        2384     2384           
  Branches      222      222           
=======================================
  Hits         2325     2325           
  Misses         45       45           
  Partials       14       14

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 fcf49ed...579b6e8. Read the comment docs.

@therefromhere
Copy link
Contributor

Thanks!

I think it can be tweaked a bit to set raw_id_fields in StripeModelAdmin? That means we're less likely to miss setting this in new models.

I'll make this tweak.

@therefromhere therefromhere merged commit bbfb005 into dj-stripe:master Oct 14, 2019
@ryancausey ryancausey deleted the feature/raw-ids-for-days branch October 14, 2019 18:44
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.

2 participants