'gte' missing in get_db_prep_lookup lookup
|Reported by:||gatwanagu||Owned by:||Andy Durdin|
|Component:||Database layer (models, ORM)||Version:||1.0|
|Severity:||Keywords:||queryset field lookup|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When using a field lookup
there is an error "Related Field has invalid lookup: ..." raised, when using the field lookup
it works fine.
Reason is that in db/models/fields/related.py in the function get_db_prep_lookup the lookup_type is cross checked against a list, and in this list 'gte' is missing.
Inserting 'gte' (and 'lte' to keep it synced) fixes the problem. There is a FIXME about this checking.
I don't understand what is the big difference in handling 'gt' to 'gte' and why 'gte' and 'lte' can't be inserted
Change History (13)
comment:1 Changed 8 years ago by
|Component:||Uncategorized → Database layer (models, ORM)|
|Patch needs improvement:||unset|
comment:8 Changed 7 years ago by
|Owner:||changed from joelhooks to Andy Durdin|
|Status:||new → assigned|