Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1679 | removing ref concepts/mappings corre…
Browse files Browse the repository at this point in the history
…ctly
  • Loading branch information
snyaggarwal committed Oct 26, 2023
1 parent 1a39066 commit ab08e96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/collections/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,13 +1046,13 @@ def delete_references(self, references):
concepts = reference.concepts
if concepts.exists():
index_concepts = True
filters = {'id__in': list(concepts.values_list('id', flat=True))}
filters = {'versioned_object_id__in': list(concepts.values_list('versioned_object_id', flat=True))}
self.concepts.set(self.concepts.exclude(**filters))
batch_index_resources.apply_async(('concept', filters), queue='indexing')
mappings = reference.mappings
if mappings.exists():
index_mappings = True
filters = {'id__in': list(mappings.values_list('id', flat=True))}
filters = {'versioned_object_id__in': list(mappings.values_list('versioned_object_id', flat=True))}
self.mappings.set(self.mappings.exclude(**filters))
batch_index_resources.apply_async(('mapping', filters), queue='indexing')

Expand Down

0 comments on commit ab08e96

Please sign in to comment.