#27473: Allow using Extract() with DurationField
-------------------------------------+-------------------------------------
Reporter: Daniel Hahler | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.10
(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
-------------------------------------+-------------------------------------
Comment (by Daniel Hahler):
Cool, working on a PR now.
I've noticed that with SQLite, the "Extract" for a DurationField appears
to return NULL/None always, e.g. with
`DTModel.objects.annotate(duration_s=Extract('duration', 'second'))`.
Should this throw some error instead? Would that be possible in `Extract`
already (so basically keeping the current behavior there for unsupported
backends)?
Or would it need some other special casing?
--
Ticket URL: <https://code.djangoproject.com/ticket/27473#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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.c95b41d9247d3c943f0acb923d25f384%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.