Skip to content

Commit

Permalink
Fix handling of deleted objects in ModelFromDocumentOperator
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusher committed Dec 7, 2024
1 parent 24840a4 commit 639915e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wagtail_vector_index/storage/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ def _get_deduplicated_objects_generator(
if key in seen_keys:
continue
seen_keys.add(key)
yield objects_by_key[key]
if key in objects_by_key:
yield objects_by_key[key]

@staticmethod
def _get_models_by_key(keys_by_model_label: dict) -> dict[ModelKey, models.Model]:
Expand Down

0 comments on commit 639915e

Please sign in to comment.