diff options
author | Brett Walker <bwalker@gitlab.com> | 2019-01-29 13:11:04 -0600 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-01-30 23:18:21 +0100 |
commit | e725ee0c30650ea5041afe6bc36e15a5ff2f8a07 (patch) | |
tree | 9a0019a281c17a25a87f294c0d879b9409d0d111 /app/services/issuable_base_service.rb | |
parent | 19dc2fb082ebeb8c1874f59282eead8a8e05fb35 (diff) | |
download | gitlab-ce-e725ee0c30650ea5041afe6bc36e15a5ff2f8a07.tar.gz |
Changes for review comments
Diffstat (limited to 'app/services/issuable_base_service.rb')
-rw-r--r-- | app/services/issuable_base_service.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb index 2835d598311..93dd6893e42 100644 --- a/app/services/issuable_base_service.rb +++ b/app/services/issuable_base_service.rb @@ -266,18 +266,18 @@ class IssuableBaseService < BaseService update_task_params = params.delete(:update_task) return unless update_task_params - toggler = TaskListToggleService.new(issuable.description, issuable.description_html, - line_source: update_task_params[:line_source], - line_number: update_task_params[:line_number], - currently_checked: !update_task_params[:checked], - index: update_task_params[:index], - sourcepos: !issuable.legacy_markdown?) - - if toggler.execute + tasklist_toggler = TaskListToggleService.new(issuable.description, issuable.description_html, + line_source: update_task_params[:line_source], + line_number: update_task_params[:line_number], + toggle_as_checked: update_task_params[:checked], + index: update_task_params[:index], + sourcepos: !issuable.legacy_markdown?) + + if tasklist_toggler.execute # by updating the description_html field at the same time, # the markdown cache won't be considered invalid - params[:description] = toggler.updated_markdown - params[:description_html] = toggler.updated_markdown_html + params[:description] = tasklist_toggler.updated_markdown + params[:description_html] = tasklist_toggler.updated_markdown_html # since we're updating a very specific line, we don't care whether # the `lock_version` sent from the FE is the same or not. Just |