-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Type error in DjangoObjectPermissionsFilter on Python 3.4 : unorderable types: list() >= tuple() #4005
Comments
At the moment our tests are run against Django-Guardian 1.3.2 |
same issue. I'm facing while upgrading drf-extensions to djano 1.9 drf 3.3.3 gurdian 1.4.2 |
as far guardian the issue is actually django guardian specific and been fixed in master |
@auvipy thanks for reporting. I'm closing this issue, we'll bump the guardian version in some time. |
the fixed version is unreleased yet :/ facing lot of trouble with drf-extensions 1.9 support :( |
The thing is, if we change the tuple in favor of a list, we'll break already working guardians. I don't really see another solution here. |
exactly |
We also had this error at production... |
Milestoning to increase the priority of this one. |
Checklist
master
branch of Django REST framework.Steps to reproduce
on Python 3.4
File "/rest_framework/filters.py", line 309, in filter_queryset
if guardian.VERSION >= (1, 3):
TypeError: unorderable types: list() >= tuple()
on Python 2.7
guardian.VERSION >= (1, 3) always False
currently in filters.py:309 -
if guardian.VERSION >= (1, 3):
on python 2.7 always False
replace to -
if guardian.VERSION >= [1, 3]:
Expected behavior
Filtered result
Actual behavior
Exception occurred on Python 3.4
All object showed on Python 2.7
The text was updated successfully, but these errors were encountered: