Q objects using callables won't combine in 2.4
|Reported by:||alexr||Owned by:|
|Component:||Database layer (models, ORM)||Version:||1.1|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This causes a stack trace in 2.4 only.
#in python2.4 from django.db.models import Q def a(): return None Q(test=a)|Q(test=1)
This looks to be hitting the same python deepcopy bug as #5505.
This only happens if the callable parameter is first.
For example (using same function as above):
Q(test=1)|Q(test=1) #OK Q(test=1)|Q(test=a) #OK Q(test=a)|Q(test=1) #Bad Q(test=a)|Q(test=a) #Bad
Change History (18)
comment:1 Changed 7 years ago by alexr
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:4 Changed 6 years ago by ramiro
- Owner changed from nobody to ramiro
- Status changed from new to assigned
comment:5 Changed 6 years ago by ramiro
- Owner ramiro deleted
- Status changed from assigned to new
- Triage Stage changed from Unreviewed to Accepted