kopia lustrzana https://github.com/wagtail/wagtail
Prevent error on publish check in create_log_entries_from_revisions (#6628)
Fixes #6498pull/7887/head
rodzic
7fd9a49e9c
commit
7c2ae57a2d
|
@ -7,6 +7,7 @@ Changelog
|
|||
* Fix: Updated project template migrations to ensure that initial homepage creation runs before addition of locale field (Dan Braghis)
|
||||
* Fix: Restore ability to use translatable strings in `LANGUAGES` / `WAGTAIL_CONTENT_LANGUAGES` settings (Andreas Morgenstern)
|
||||
* Fix: Allow `locale` / `translation_of` API filters to be used in combination with search (Matt Westcott)
|
||||
* Fix: Prevent error on `create_log_entries_from_revisions` when checking publish state on a revision that cannot be restored (Kristin Riebe)
|
||||
|
||||
|
||||
2.11.2 (17.11.2020)
|
||||
|
|
|
@ -486,6 +486,7 @@ Contributors
|
|||
* Naglis Jonaitis
|
||||
* Luis Nell
|
||||
* Andreas Morgenstern
|
||||
* Kristin Riebe
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -16,6 +16,7 @@ Bug fixes
|
|||
* Updated project template migrations to ensure that initial homepage creation runs before addition of locale field (Dan Braghis)
|
||||
* Restore ability to use translatable strings in ``LANGUAGES`` / ``WAGTAIL_CONTENT_LANGUAGES`` settings (Andreas Morgenstern)
|
||||
* Allow ``locale`` / ``translation_of`` API filters to be used in combination with search (Matt Westcott)
|
||||
* Prevent error on ``create_log_entries_from_revisions`` when checking publish state on a revision that cannot be restored (Kristin Riebe)
|
||||
|
||||
|
||||
Upgrade considerations
|
||||
|
|
|
@ -60,7 +60,10 @@ class Command(BaseCommand):
|
|||
comparison = get_comparison(revision.page.specific, previous_revision_as_page, current_revision_as_page)
|
||||
has_content_changes = len(comparison) > 0
|
||||
|
||||
if current_revision_as_page.live_revision_id == previous_revision.id:
|
||||
if (
|
||||
current_revision_as_page is not None
|
||||
and current_revision_as_page.live_revision_id == previous_revision.id
|
||||
):
|
||||
# Log the previous revision publishing.
|
||||
self.log_page_action('wagtail.publish', previous_revision, True)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue