Changes between Initial Version and Version 1 of Ticket #31446


Ignore:
Timestamp:
Apr 9, 2020, 11:52:22 AM (5 years ago)
Author:
Gerben Morsink
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31446 – Description

    initial v1  
    33When doing:
    44
    5 Ticket.objects.annotate(
     5{{{Ticket.objects.annotate(
    66    notify_date=ExpressionWrapper(
    77        F('date') - F('notify_before_in_days'), output_field=DateField()))
    8 
     8}}}
    99With on Ticket a modelfield: date =  models.DateField() will yield wrong results if notify_before_in_days passes through the month boundary.
    1010E.g. If date is 9th of April and notify_before_in_days = 10, it will yield: 20200399 for notify_date, instead of 20200331.
Back to Top