-
Notifications
You must be signed in to change notification settings - Fork 270
Fix DocType._get_actions preventing delete #370
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
Conversation
Interesting find. Can you let me know how to reproduce the issue? I was the person who implemented |
Of course 👍 you can use this example : https://github.com/seljin/ded-should-index-example I stay available if you need anything :) |
Great Find @seljin! 💯 Not calling But I am concerned about people who are already overriding Another way might be passing the |
Thank you for your response :) Could you show me an example of how and why you customize I can't think of a case that you need to do that because when you delete an object in the database you need to delete it in the index no matter what. If you dont do that the index is not synced with your database. Maybe there is something I cant see here, it might be a good learning for me if you could show me an example |
Codecov Report
@@ Coverage Diff @@
## master #370 +/- ##
==========================================
+ Coverage 67.85% 68.00% +0.14%
==========================================
Files 12 12
Lines 756 747 -9
==========================================
- Hits 513 508 -5
+ Misses 243 239 -4
Continue to review full report at Codecov.
|
Yup, @seljin is right. I was thinking about something different which is not the case for this package. I am 👍 with this. |
…earch-dsl into fix-get-actions-delete
Great, thank you for your time @saadmk11 and @safwanrahman 👍 |
This reverts commit 79218c8.
Hi everybody, thank you for the good work here.
There is a case when ES index is not updated on instance deletion :
If we base our should_index_object method on manytomany field, when we delete an object, the related objects are deleted before the object itself and doesnt exists anymore when should_index_object method is called.
Thus, should_index_object return is incoherent in this case and the ES index is not updated.
I think we should not call should_index on delete action, what do you think ?
I also corrected some flake8 errors.