Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if an object is still in index_queryset #63

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Check if an object is still in index_queryset #63

wants to merge 1 commit into from

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