From bde322450366b5e2d733dfeaeb05eb38dbc7d45a Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Fri, 9 Aug 2024 20:23:52 +0530 Subject: [PATCH] fixup! fix: exclude deleted drafts while publishing --- openedx_learning/apps/authoring/publishing/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx_learning/apps/authoring/publishing/api.py b/openedx_learning/apps/authoring/publishing/api.py index cdaaa4af..de067272 100644 --- a/openedx_learning/apps/authoring/publishing/api.py +++ b/openedx_learning/apps/authoring/publishing/api.py @@ -249,7 +249,7 @@ def publish_all_drafts( """ draft_qset = Draft.objects \ .select_related("entity__published") \ - .filter(entity__learning_package_id=learning_package_id, version__isnull=False) \ + .filter(entity__learning_package_id=learning_package_id) \ .exclude(entity__published__version_id=F("version_id")) return publish_from_drafts( learning_package_id, draft_qset, message, published_at, published_by