mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-24 19:17:48 +01:00
Only update changed field
This commit is contained in:
parent
24726b3797
commit
9efdadb68a
@ -114,7 +114,7 @@ class PublishRevisionAction:
|
||||
object.has_unpublished_changes = True
|
||||
# Instead set the approved_go_live_at of this revision
|
||||
revision.approved_go_live_at = object.go_live_at
|
||||
revision.save()
|
||||
revision.save(update_fields=["approved_go_live_at"])
|
||||
# And clear the approved_go_live_at of any other revisions
|
||||
object.revisions.exclude(id=revision.id).update(approved_go_live_at=None)
|
||||
# if we are updating a currently live object skip the rest
|
||||
|
Loading…
Reference in New Issue
Block a user