diff --git a/wagtail/admin/tests/pages/test_explorer_view.py b/wagtail/admin/tests/pages/test_explorer_view.py index f4bd5e0102..0e9ee4d6a0 100644 --- a/wagtail/admin/tests/pages/test_explorer_view.py +++ b/wagtail/admin/tests/pages/test_explorer_view.py @@ -1284,7 +1284,7 @@ class TestInWorkflowStatus(WagtailTestUtils, TestCase): # Warm up cache self.client.get(self.url) - with self.assertNumQueries(47): + with self.assertNumQueries(44): response = self.client.get(self.url) self.assertEqual(response.status_code, 200) diff --git a/wagtail/models/__init__.py b/wagtail/models/__init__.py index d00c27e160..93a7388717 100644 --- a/wagtail/models/__init__.py +++ b/wagtail/models/__init__.py @@ -642,7 +642,7 @@ class DraftStateMixin(models.Model): def get_lock(self): # Scheduled publishing lock should take precedence over other locks - if self.scheduled_revision: + if self.approved_schedule: return ScheduledForPublishLock(self) return super().get_lock()