Skip to content

Commit

Permalink
Quick fix for plagiarism alerts with no Article record
Browse files Browse the repository at this point in the history
If there's an alert for an article that hasn't yet showed up in the Dashboard's Article table, this field can be empty on the Alert record.
  • Loading branch information
ragesoss committed Dec 19, 2024
1 parent a9dc385 commit e85116c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/mailers/suspected_plagiarism_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def content_expert_email(alert, content_experts)
@diff_url = alert.diff_url
@user = alert.user
@article = alert.article
@article_url = @article.url
@article_url = @article&.url
@courses_user = @user.courses_users.last
@course = alert.course
@talk_page_new_section_url = @courses_user.talk_page_url + '?action=edit&section=new'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
made
#{link_to 'this change', @diff_url, class: 'link'}
to the article
"#{link_to @article.full_title, @article_url, class: 'link'}", which Turnitin/iThenticate matched to published
"#{link_to @article&.full_title, @article_url, class: 'link'}", which Turnitin/iThenticate matched to published
text.
%p.paragraph
These reports are not 100% accurate. For example, a direct quote with proper attribution
Expand Down

0 comments on commit e85116c

Please sign in to comment.