Commit 7d85a0b71f29332720aef272e9b22b7d791a2d29

Authored by Michel Felipe
1 parent 95425b4b

Fix the categories list error when is empty

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]
... ...