Changes between Initial Version and Version 1 of Ticket #26239, comment 2


Ignore:
Timestamp:
Mar 10, 2016, 6:41:15 PM (9 years ago)
Author:
Tim Graham

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26239, comment 2

    initial v1  
    1 Replying to [ticket:26239 boussouira]:
    2 > I don't know if this is a bug or not, but when using `update()`, the DateTime fields with `auto_now` are not updated to the current time. The documentation of `auto_now` doesn't say anything about that situation.
    3 > For example:
    4 >
    5 > {{{
    6 > #  This won't update `updated_at`:
    7 > Order.objects.filter(user_id=7).update(check_count=3)
    8 >
    9 > # You have to explicitly include it in update()
    10 > Order.objects.filter(user_id=7).update(check_count=3, updated_at=timezone.now())
    11 > }}}
    12 
    13 --> I will try to work on this. But should update be modified to include timestamp by itself or documentation should be altered to state that timestamp needs to be passed explicitly ?
     1I will try to work on this. But should update be modified to include timestamp by itself or documentation should be altered to state that timestamp needs to be passed explicitly ?
Back to Top