mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
render error when people attempt to save an invalid group name
hide controls when we showing an automatic group
This commit is contained in:
@ -20,9 +20,12 @@ class Admin::GroupsController < Admin::AdminController
|
||||
can_not_modify_automatic
|
||||
else
|
||||
group.usernames = params[:group][:usernames]
|
||||
group.name = params[:group][:name] if params[:name]
|
||||
group.save!
|
||||
render json: "ok"
|
||||
group.name = params[:group][:name] if params[:group][:name]
|
||||
if group.save
|
||||
render json: "ok"
|
||||
else
|
||||
render_json_error group
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user