| Summary: | The "Local configuration variables" filter returns an error when applied on top of search results | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Belen Barros Pena <belen.barros.pena> |
| Component: | toaster | Assignee: | David Reyna <david.reyna> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | alexandru.damian, belen.barros.pena, cristiana.voicu, jessica.zhang |
| Version: | unspecified | ||
| Target Milestone: | 1.6 M5 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Belen Barros Pena
2014-03-13 13:51:45 UTC
It is the "regex" filter returning an empty set to a search that leads to the error. The filter in question is the "vhistory__file_name__regex:conf/(local|bblayers).conf" If I change the filter to ... filter=vhistory__file_name__contains:conf/bblayers.con ... it leads to an empty table and no errors. If I leave the filter but remove the "search=kernel" I get results returned and no error. The bug is deeper than that, somewhere inside the handling of the lambda function from "_get_search_results" in the Django Q object filtering.
The regex filtering in "_get_queryset" returns a successful queryset with some 20 entries.
Then in "_get_search_results", the Q object filter call for the search terms does return, but the resulting queryset object is damaged, in that any method call ("exists", "count", ...) will immediately cause the reported error. I find that if I replace the Q object with a simple filter (no lamba), there is no error.
Is this a bug in the Q() in Django itself ? (In reply to comment #3) > Is this a bug in the Q() in Django itself ? No, this is an issue with Sqlite3 engine. reference: http://www.gossamer-threads.com/lists/python/python/543700 commit 74e2f8501997143162855b970ffd9fdb33d24bd8 verified in master:db80f796e78746014a0f9497638e5c6fd2953ef0 |