From 9b3c882ed90bf17e8c444b2f114d0df671d38c7b Mon Sep 17 00:00:00 2001 From: John Nagro Date: Fri, 29 Sep 2023 11:37:07 -0400 Subject: [PATCH] fix: only test course content metadata (#682) --- .../management/commands/compare_catalog_queries_to_filters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/enterprise_catalog/apps/catalog/management/commands/compare_catalog_queries_to_filters.py b/enterprise_catalog/apps/catalog/management/commands/compare_catalog_queries_to_filters.py index 4d0a87baa..3afe2aed9 100644 --- a/enterprise_catalog/apps/catalog/management/commands/compare_catalog_queries_to_filters.py +++ b/enterprise_catalog/apps/catalog/management/commands/compare_catalog_queries_to_filters.py @@ -3,6 +3,7 @@ from django.core.management.base import BaseCommand from enterprise_catalog.apps.catalog import filters +from enterprise_catalog.apps.catalog.constants import COURSE from enterprise_catalog.apps.catalog.models import ( ContentMetadata, EnterpriseCatalog, @@ -22,7 +23,7 @@ def handle(self, *args, **options): Cook it. """ logger.info('compare_catalog_queries_to_filters starting...') - for content_metadata in ContentMetadata.objects.all(): + for content_metadata in ContentMetadata.objects.filter(content_type=COURSE): for enterprise_catalog in EnterpriseCatalog.objects.all(): discovery_included = content_metadata in enterprise_catalog.content_metadata match = filters.does_query_match_content(