Skip to content

Commit

Permalink
reduce method in the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
piedram committed Oct 25, 2024
1 parent 4539456 commit 7bf3c30
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/controllers/tasks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def request_hearing_disposition_change
end

def upload_transcription_to_vbms
if task.type == "ReviewTranscriptTask" && task.status == "in_progress"
return unless task.type == "ReviewTranscriptTask" && task.status == "in_progress"
new_instructions = task.instructions.push(params[:task][:instructions])

Transcription.where(task_id: task.id).update_all(
Expand All @@ -201,7 +201,6 @@ def upload_transcription_to_vbms
status: Constants.TASK_STATUSES.completed,
closed_at: Time.zone.now
)
end
end

private
Expand Down

0 comments on commit 7bf3c30

Please sign in to comment.