mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-07 20:40:26 +08:00
Fix view state validation [SCI-3436]
This commit is contained in:
parent
6e1a7a3392
commit
097639e71e
1 changed files with 3 additions and 2 deletions
|
@ -9,11 +9,12 @@ class ViewState < ApplicationRecord
|
||||||
message: :not_unique
|
message: :not_unique
|
||||||
}
|
}
|
||||||
|
|
||||||
validate :validate_state
|
validate :validate_state_content
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def validate_state
|
def validate_state_content
|
||||||
|
return unless state.present?
|
||||||
viewable.validate_view_state(self)
|
viewable.validate_view_state(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue