From 3dbbbac16cc9ed6ded31f79e0b825fc44f793298 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Wed, 14 Aug 2024 21:03:27 +0530 Subject: [PATCH] chore: add comment --- openedx/core/djangoapps/content/search/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/content/search/api.py b/openedx/core/djangoapps/content/search/api.py index cc80d36cbd49..4262b8a7b13f 100644 --- a/openedx/core/djangoapps/content/search/api.py +++ b/openedx/core/djangoapps/content/search/api.py @@ -476,7 +476,8 @@ def delete_all_draft_docs_for_library(library_key: LibraryLocatorV2) -> None: # Delete all documents where last_published is null i.e. never published before. delete_filter = [ f'{Fields.context_key}="{library_key}"', - # inner arrays are connected by an OR + # This field should only be NULL or have a value, but we're also checking IS EMPTY just in case. + # Inner arrays are connected by an OR [f'{Fields.last_published} IS EMPTY', f'{Fields.last_published} IS NULL'], ]