Skip to content

Commit

Permalink
update task update action to not remove next due in days when complet…
Browse files Browse the repository at this point in the history
…ing task
  • Loading branch information
MooseCowBear committed Mar 9, 2024
1 parent 024a6bf commit a16326e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/organizations/tasks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def edit
end

def update
@task.next_due_date_in_days = nil unless task_params.dig(:next_due_date_in_days)
@task.next_due_date_in_days = nil unless task_params.dig(:next_due_date_in_days) || task_params.dig(:completed)

if @task.update(task_params)
if @task.recurring && @task.completed_previously_changed?(from: false, to: true)
Expand Down

0 comments on commit a16326e

Please sign in to comment.