Skip to content

Conversation

@Craterdome
Copy link

There is an issue where if an object is updated in a way that removes it from the index_queryset it does not get removed upon update. This can be fixed by overriding update_object or instead should_update to check if an object is no longer in the queryset and removing instead of updating.

There is an issue where if an object is updated in a way that removes it from the index_queryset it does not get removed upon update.  This can be fixed by overriding update_object or instead should_update to check if an object is no longer in the queryset and removing instead of updating.
@Craterdome
Copy link
Author

Craterdome commented Dec 28, 2016

if not self.index_queryset(**kwargs).filter(id=instance.id).exists():
this would be a better way to write it

@yeago
Copy link

yeago commented Mar 24, 2017

what is ProjectIndex?

if instance.id not in ids:
self.remove_object(instance)
else:
super(ProjectIndex, self).update_object(instance, using, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a project-specific subclass ProjectIndex

@bigjust
Copy link
Contributor

bigjust commented Sep 28, 2017

Is this still an issue? If so, can you provide a failing test for the test suite?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants