-
Notifications
You must be signed in to change notification settings - Fork 797
AO3-7358 Fix 500 error when sending item_added_notification for bookmark of deleted work #5804
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,11 @@ | |
| <% if @creation.is_a?(Work) %> | ||
| <i><b><%= style_link(@creation.title.html_safe, work_url(@creation)) %></b></i> | ||
| <% else %> | ||
| <% if @creation.bookmarkable == nil %> | ||
| Bookmark of deleted item | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally, we'd prefer to internationalise text. But since that would significantly complicate the pull request, it's good to keep it like this for now. Just wanted to note it for the future That said, could you indent this and the other line inside the |
||
| <% else %> | ||
| <i><b><%= style_link("A bookmark of: " + @creation.bookmarkable.title.html_safe, bookmark_url(@creation)) %></b></i> | ||
| <% end %> | ||
| <% end %> | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,16 +2,20 @@ | |
| <% pseuds = @creation.is_a?(Work) ? @creation.pseuds.map{|p| text_pseud(p)}.to_sentence.html_safe : @creation.pseud.name %> | ||
|
|
||
|
|
||
| <%= @creation.is_a?(Work) ? @creation.pseuds.length > 0 ? pseuds : @creation.authors_to_sort_on : pseuds %> posted a <%= @creation.is_a?(Work) ? @creation.backdate ? "backdated " : "new " : "new " %> <%= @creation.is_a?(Work) ? "work" : "bookmark" %> to your collection, "<%= @collection.name %>" (<%= collection_url(@collection) %>: | ||
| <%= @creation.is_a?(Work) ? @creation.pseuds.length > 0 ? pseuds : @creation.authors_to_sort_on : pseuds %> posted a <%= @creation.is_a?(Work) ? @creation.backdate ? "backdated " : "new " : "new " %> <%= @creation.is_a?(Work) ? "work" : "bookmark" %> to your collection, "<%= @collection.name %>" (<%= collection_url(@collection) %>): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice work spotting that missing parenthesis! |
||
|
|
||
| <% if @creation.is_a?(Work) %> | ||
| "<%= @creation.title.html_safe %>" | ||
| <%= work_url(@creation) %> | ||
| <% else %> | ||
| <% if @creation.bookmarkable == nil %> | ||
| Bookmark of deleted item | ||
| <% else %> | ||
| <%= "A bookmark of: " + @creation.bookmarkable.title.html_safe %> | ||
| <%= bookmark_url(@creation) %> | ||
| <% end %> | ||
| <% end %> | ||
| <% end %> | ||
|
|
||
| <% content_for :footer_note do %> | ||
| You're receiving this email because you've chosen to be notified when new items are added to your collection "<%= @collection.name %>" (<%= collection_url(@collection) %>). Follow the link to change settings if you no longer wish to receive updates. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another style nitpick: Could you check
unless @creation.bookmarkableinstead?