Skip to content

Commit

Permalink
fix: guard against null content_filters (#1999)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnagro authored Jan 23, 2024
1 parent d0ad125 commit e26205b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Change Log
Unreleased
----------

[4.10.8]
--------

fix: guard against null content_filters


[4.10.7]
--------

Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "4.10.7"
__version__ = "4.10.8"
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,17 @@ def handle(self, *args, **options):
f'updated query {catalog_query.id}'
)

for cusrtomer_catalog_batch in batch_by_pk(EnterpriseCustomerCatalog):
for customer_catalog in cusrtomer_catalog_batch:
for customer_catalog_batch in batch_by_pk(EnterpriseCustomerCatalog):
for customer_catalog in customer_catalog_batch:
logger.info(f'{customer_catalog.uuid}')

if customer_catalog.content_filter is None:
logger.info(
'add_exec_ed_exclusion_to_catalogs '
f'catalog {customer_catalog.uuid} has no content_filter'
)
continue

if customer_catalog.content_filter.get('course_type__exclude'):
logger.info(
'add_exec_ed_exclusion_to_catalogs '
Expand Down

0 comments on commit e26205b

Please sign in to comment.