Changes between Version 1 and Version 3 of Ticket #32418


Ignore:
Timestamp:
Feb 4, 2021, 8:50:30 AM (4 years ago)
Author:
Mariusz Felisiak
Comment:

Duplicate of #28925, fixed in dd5aa8cb5ffc0a89c4b9b8dee45c1c919d203489 (Django 3.2+).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32418

    • Property Summary Django f expressions seems to not work with MySQLF() expressions crash due to some interval/duration error on MySQL.
    • Property Component UncategorizedDatabase layer (models, ORM)
    • Property Resolutionduplicate
    • Property Status newclosed
  • Ticket #32418 – Description

    v1 v3  
    1414      Q(booking_dt__gte=next_interval)) |
    1515    Q(Q(booking_end__lte=first_interval),
    16       Q(booking_end__gte=next_interval)))duration_expression = ExpressionWrapper(
    17     datetime.timedelta(minutes=1) * F('duration'),
    18     output_field=DurationField())
    19 booking_end = ExpressionWrapper(
    20     F('booking_dt') + duration_expression,
    21     output_field=DateTimeField())
    22 booking_qs.annotate(
    23     booking_end=booking_end).get(
    24     Q(Q(booking_dt__lte=first_interval),
    25       Q(booking_dt__gte=next_interval)) |
    26     Q(Q(booking_end__lte=first_interval),
    2716      Q(booking_end__gte=next_interval)))
    2817}}}
    2918
    30 
    31 
    3219Error I get:
    33 
    3420
    3521{{{
Back to Top