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

Support for Django 2.2 #2

Open
john-athena opened this issue Jun 13, 2020 · 0 comments
Open

Support for Django 2.2 #2

john-athena opened this issue Jun 13, 2020 · 0 comments

Comments

@john-athena
Copy link

Seems like the library is not supported in Django 2.2.

File "/home/repo/venv/lib/python3.8/site-packages/sortedone2many/fields.py", line 277, in contribute_to_related_class
    if not self.rel.is_hidden() and not related.related_model._meta.swapped:
AttributeError: 'OneToManyField' object has no attribute 'rel'

Seems like rel has been removed: https://docs.djangoproject.com/en/2.0/releases/1.9/#field-rel-changes

I could confirm that changing self.rel to self.remote_field "worked". That said, 'rel' seems to be prevalent in multiple places, so this single line patch isn't enough.

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

No branches or pull requests

1 participant