Opened 8 months ago
Closed 8 months ago
#36275 closed New feature (invalid)
Update auto_now fields when using bulk_update
| Reported by: | Rodolfo Becerra | Owned by: | Rodolfo Becerra |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 5.1 |
| Severity: | Normal | Keywords: | auto_now, bulk_update |
| Cc: | Rodolfo Becerra | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I have seen an issue and I know that currently bulk_update does not update the date fields that have the auto_now=True parameter when calling
I have a suggestion to add a new parameter to the bulk_update method update_auto_now=True or auto_now=True that updates the field if the parameter is True (which by default it would be) and if the field has not been previously updated before calling the method.
I would love to try this update if you guys see it viable.
Change History (2)
comment:1 by , 8 months ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , 8 months ago
| Resolution: | → invalid |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
For the same reasons
update(#15566) andupdate_or_create(ticket:35890#comment:6) don't implicitly coverauto_nowfields in call cases I wouldn't expectbulk_updatedo to so either.Given there's an open ticket to deprecate
auto_now#22995 altogether I'm going to close this ticket.