Skip to content

auto_now field does not get updated on model.save(update_fields=[]) if it is not included in update_fields #1512

@itzNikshit

Description

@itzNikshit

Hi there,
I am a bit new to tortoise-orm and was playing with things where I encountered a problem where an auto_now=True datetimefield does not get updated if I call model.save(update_fields=['updated_field']). It only gets updated if I pass the auto_now field in update_fileds. I don't know if this was intentional or a miss or just that's how things work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions