mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
FIX: detection of error changed, so you can clear errors
This commit is contained in:
parent
703e6faf54
commit
5365973c0a
@ -95,10 +95,12 @@ COMPILED
|
||||
self.error = nil unless error.nil?
|
||||
rescue SassC::SyntaxError => e
|
||||
self.error = e.message
|
||||
if error_changed?
|
||||
update_columns(error: self.error)
|
||||
end
|
||||
end
|
||||
|
||||
if error_changed?
|
||||
update_columns(error: self.error)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -21,8 +21,10 @@ HTML
|
||||
field = ThemeField.create!(theme_id: 1, target: 0, name: "scss", value: css)
|
||||
field.reload
|
||||
expect(field.error).not_to eq(nil)
|
||||
field.value = ""
|
||||
field.value = "body {color: blue};"
|
||||
field.save!
|
||||
field.reload
|
||||
|
||||
expect(field.error).to eq(nil)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user