Opened 6 years ago

Last modified 6 years ago

#29668 closed Bug

missing FROM-clause entry in subquery with extra — at Initial Version

Reported by: pranavneeraj Owned by: nobody
Component: Database layer (models, ORM) Version: 2.0
Severity: Normal Keywords:
Cc: Mariusz Felisiak Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Turn.active_objects.all().select_related('requestaddress').extra(select={'start_time_tz': '(start_time AT TIME ZONE COALESCE("api_address".timezone))'}).distinct() Works but Turn.active_objects.all().select_related('requestaddress').extra(select={'start_time_tz': '(start_time AT TIME ZONE COALESCE("api_address".timezone))'}).distinct().count() doesn't.

Because count executes subquery.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top