Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
AO3-5279 - Deleting bookmarks causes error in BookmarkIndexer. #3201
+6
−6
Conversation
| @@ -89,7 +89,7 @@ def document(object) | ||
| tag_ids: tags.map(&:id) | ||
| ) | ||
| - unless parent_id(object).match("deleted") | ||
| + unless parent_id(object.id, object).match("deleted") |
| @@ -143,7 +143,7 @@ def index_document(object) | ||
| body: document(object) | ||
| } | ||
| if respond_to?(:parent_id) | ||
| - info.merge!(routing: parent_id(object)) | ||
| + info.merge!(routing: parent_id(object.id, object)) |
houndci-bot
Dec 10, 2017
Use info[:routing] = parent_id(object.id, object) instead of info.merge!(routing: parent_id(object.id, object)).
redsummernight
added
the
Awaiting review
label
Dec 10, 2017
sarken
added
Priority: Broken on Test (High)
Reviewed: Ready to Merge
and removed
Awaiting review
labels
Dec 10, 2017
sarken
merged commit ca34c88
into
otwcode:master
Dec 10, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tickinginstant commentedDec 10, 2017
Issue
https://otwarchive.atlassian.net/browse/AO3-5279
Purpose
When the BookmarkIndexer tries to look up a bookmark that's been deleted, the object associated with the deleted ID will be nil. The parent_id function tries to call object.id if the object is nil; instead, it should take the object's ID as an argument and use that to access the information it needs.
Testing
Try deleting a bookmark, wait a while, and then check the logs to see if there has been an error.