Skip to content

Commit

Permalink
Fixing batch index processing when filters are None
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Oct 4, 2023
1 parent dd9a243 commit 1d8f346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/common/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def batch_index_resources(resource, filters, update_indexed=False):
model = get_resource_class_from_resource_name(resource)
if isinstance(filters, str):
filters = json.loads(filters)
if model:
if model and filters is not None:
queryset = model.objects.filter(**filters)
model.batch_index(queryset, model.get_search_document())

Expand Down

0 comments on commit 1d8f346

Please sign in to comment.