mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
The field last_update_time is set to auto_now in the Django model, but it is not being updated when using update_or_create() since Django 4.2. This is because it sends update_fields= argument to save(). Say, a user installed an app a few hours ago and uninstalls it now, the notification should be updated to show the uninstallation status but it shows the timestamp of the installation instead. Explicitly setting the updated timestamp is one way of fixing this issue. Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> [sunil: Use django_db mark in test case] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>