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 ImportError: cannot import name 'JSONField' from 'social_django.fields' when JSONFIELD_CUSTOM is set #502

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

rochacbruno
Copy link
Contributor

When setting JSONFIELD_CUSTOM the logic was importing under the wrong name with Base suffix raising Import Error as the module ended up having no JSONField to be imported.

Looks like due to a recent change the JSONFieldBase` is no more needed.

When setting JSONFIELD_CUSTOM the logic was importing under the wrong name with `Base` suffix raising `Import Error` as the module ended up having no `JSONField` to be imported.

Looks like due toa  recent change the JSONFieldBase` is no more needed.
@nijel nijel marked this pull request as ready for review September 6, 2023 18:11
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (4b4b019) 93.99% compared to head (6c5dfbe) 93.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #502   +/-   ##
=======================================
  Coverage   93.99%   93.99%           
=======================================
  Files          39       39           
  Lines        1116     1116           
  Branches      129      129           
=======================================
  Hits         1049     1049           
  Misses         43       43           
  Partials       24       24           
Flag Coverage Δ
unittests 93.99% <0.00%> (ø)

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

Files Changed Coverage Δ
social_django/fields.py 30.00% <0.00%> (ø)

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

@nijel nijel merged commit 3798bc1 into python-social-auth:master Sep 6, 2023
7 of 8 checks passed
@nijel
Copy link
Member

nijel commented Sep 6, 2023

Merged, thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants