Don't save wiki page when notes value is null
This commit is contained in:
@@ -382,7 +382,7 @@ class Artist < ApplicationRecord
|
|||||||
if @notes.present?
|
if @notes.present?
|
||||||
create_wiki_page(body: @notes, title: name)
|
create_wiki_page(body: @notes, title: name)
|
||||||
end
|
end
|
||||||
elsif wiki_page.body != @notes || wiki_page.title != name
|
elsif (!@notes.nil? && (wiki_page.body != @notes)) || wiki_page.title != name
|
||||||
# if anything changed, we need to update the wiki page
|
# if anything changed, we need to update the wiki page
|
||||||
wiki_page.body = @notes unless @notes.nil?
|
wiki_page.body = @notes unless @notes.nil?
|
||||||
wiki_page.title = name
|
wiki_page.title = name
|
||||||
|
|||||||
Reference in New Issue
Block a user