Commit 7d85a0b71f29332720aef272e9b22b7d791a2d29
1 parent
95425b4b
Exists in
master
and in
8 other branches
Fix the categories list error when is empty
Showing
1 changed file
with
6 additions
and
5 deletions
Show diff stats
controllers/myprofile/proposals_discussion_plugin_tasks_controller.rb
... | ... | @@ -48,11 +48,12 @@ class ProposalsDiscussionPluginTasksController < TasksController |
48 | 48 | |
49 | 49 | def save_categories |
50 | 50 | |
51 | - if request.post? && params[:tag_list].presence | |
52 | - result = { | |
53 | - success: false, | |
54 | - message: _('Error to save categories. Please, contact the system admin') | |
55 | - } | |
51 | + result = { | |
52 | + success: false, | |
53 | + message: _('Error to save categories. Please, contact the system admin') | |
54 | + } | |
55 | + | |
56 | + if request.post? && params[:tag_list] | |
56 | 57 | |
57 | 58 | categories_list = params[:tag_list].split(',') |
58 | 59 | task = Task.to(profile).find_by_id params[:task_id] | ... | ... |