-
Notifications
You must be signed in to change notification settings - Fork 129
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
Upgrade to 0.8.0 'unknown output field' #79
Comments
Hi @snewcomer - is |
|
Hm. stacktrace? |
|
Thanks - am taking a quick look to see if I can spot anything obvious. |
Hm, I'll have to dive into this further, but to give you an idea, |
Hi @snewcomer, I tried to recreate this but had to make a few modifications.
The test branch is here, but I was unable to recreate any issues. Feel free to submit PRs to that branch or add code comments here. |
Hi @snewcomer, were you able to resolve this? |
Been out of town. Hopefully by the end of the week. Sry about that! |
No worries. Just ping back when you have new info. Thanks. |
It's actually this line....remove it and all is good / tests pass. Any thoughts? Can't get a failing test on your fork...
|
Hm. I'm out of options to try on my end without more information.
So, instead of class PersonFilter(FilterSet):
full_name = AllLookupsFilter(name='full_name')
class Meta:
model = Person try class PersonFilter(FilterSet):
class Meta:
model = Person
fields = {
'full_name': ['regex', 'startswith', 'search', 'gt', 'gte', 'iregex', 'contains', 'endswith', 'iendswith', 'icontains', 'iexact', 'isnull', 'lt', 'istartswith', 'lte', 'in', 'range', 'exact'],
} Is an exception raised from django-filter instead? |
Yep that worked. AllLookupsFilter fails in tests and prod. One of the values from the |
That makes a lot more sense. The list from above is the set of default lookups registered to Here's an example of some transforms that Django automatically registers. |
Side note mostly to myself - the error handling here could be improved. We could try to get the |
Ya! Looks like this is the place where unaccent is registered with the CharField since I have |
I think I figured it out. I forgot to wrap the model field in an Expression, which turns it into a proper lhs that can be passed to transforms/lookups. This isn't usually an issue, as most of the Transforms override the default |
You'll notice that in django-filter, I did wrap the lhs in an Expression, so the behavior should be correct. I'm working on fixing this right now, but in the short term my recommendation is to not use |
Fix #79, add transform recursion prevention
Alright, this should be fixed. Could you install the master branch and verify? |
@rpkilby yep that did it for me. Thx! |
Great. I guess just use 885b3a5 until the next release. I'll try to remember to ping the thread when it is. |
@rpkilby Just encountered this issue when creating my own The traceback was a little more helpful:
, because a No more problems when using the master. When do you intend to release v0.8.1 ? |
There's one outstanding issue on the milestone, however Philip controls the actual release process. |
btw - v0.8.1 has been released. |
Cannot resolve unknown expression type, unknown output field
Any thoughts on what I am missing in my app? I see a utils.py file was added, but having trouble tracing down the problem.
I'm on the latest Django & django filter, and rest framework packages. Any thoughts on what I am missing b/w the jump from 0.7 to 0.8?
The text was updated successfully, but these errors were encountered: