#33257: Case() and ExpressionWrapper() doesn't work with DecimalField on SQLite.
-------------------------------------+-------------------------------------
Reporter: Matthijs Kooijman | Owner: Matthijs
| Kooijman
Type: Bug | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* owner: nobody => Matthijs Kooijman
* status: new => assigned
* stage: Unreviewed => Accepted
Comment:
Thanks for the detailed report!
> It seems that adding SQLiteNumericMixin to Case and ExpressionWrapper
actually fixes this, with the below patch all my testcases pass:
Yes, that should fix the issue (see related #31723 and #32585).
> I wonder if this mixing should be added to all expressions, so maybe to
Expression or BaseExpression?
This can be more complicated because "partial" expressions as `When()`
(`WHEN ... THEN ...`) cannot be wrapped.
--
Ticket URL: <https://code.djangoproject.com/ticket/33257#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/074.c008b07ee020308186eb0cf7ca3faee6%40djangoproject.com.