mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
fix bug when removing all keywords in protocol
This commit is contained in:
parent
8ba27f734e
commit
c2a5b52767
1 changed files with 4 additions and 2 deletions
|
@ -180,9 +180,11 @@ class ProtocolsController < ApplicationController
|
||||||
def update_keywords
|
def update_keywords
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
# sanitize user input
|
# sanitize user input
|
||||||
|
if params[:keywords]
|
||||||
params[:keywords].collect! do |keyword|
|
params[:keywords].collect! do |keyword|
|
||||||
escape_input(keyword)
|
escape_input(keyword)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if @protocol.update_keywords(params[:keywords])
|
if @protocol.update_keywords(params[:keywords])
|
||||||
format.json do
|
format.json do
|
||||||
render json: {
|
render json: {
|
||||||
|
|
Loading…
Reference in a new issue