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

Rebasing #330 #345

Merged
merged 1 commit into from
Jan 2, 2022
Merged

Rebasing #330 #345

merged 1 commit into from
Jan 2, 2022

Conversation

carlio
Copy link
Collaborator

@carlio carlio commented Jan 2, 2022

This is just #330 but rebased onto master to see if tests work.

(Also with the pre-commit formatting hooks run)

@carlio carlio force-pushed the bugfix/fk-check-for-django-model branch from 0e978bc to 2068335 Compare January 2, 2022 11:41
@coveralls
Copy link

coveralls commented Jan 2, 2022

Coverage Status

Coverage increased (+0.05%) to 86.358% when pulling 7499c9d on bugfix/fk-check-for-django-model into 8bab55e on master.

To handle this case: the project use tastypie and django.
tastypie has a `ForeignKey` field which has the same name
as django's `ForeignKey`.
The issue is the lint trys resolving the `ForeignKey` for the
tastypie `ForeignKey` which cause import error.

In this commit, add a check to ensure the current class of the
`ForeignKey` is a subclass of `Model` of django.

Tested manually
Test case added: func_noerror_foreign_key_in_non_django_class
@carlio carlio force-pushed the bugfix/fk-check-for-django-model branch from a7c1c61 to 7499c9d Compare January 2, 2022 11:41
@carlio carlio marked this pull request as ready for review January 2, 2022 11:49
@carlio carlio merged commit 54618f4 into master Jan 2, 2022
@carlio carlio deleted the bugfix/fk-check-for-django-model branch January 2, 2022 11:49
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