File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -560,14 +560,14 @@ def track_script_progress(script)
560
560
561
561
update = { }
562
562
update [ :started_at ] = time_now unless user_script . started_at
563
- update [ :last_progress_at ] = time_now
563
+ update [ :last_progress_at ] = time_now unless user_script . last_progress_at
564
564
565
565
if !user_script . completed_at && user_script . check_completed?
566
566
update [ :completed_at ] = time_now
567
567
end
568
568
569
569
# update_all bypasses validations/transactions/etc
570
- UserScript . where ( id : user_script . id ) . update_all ( update )
570
+ UserScript . where ( id : user_script . id ) . update_all ( update ) unless update . empty?
571
571
end
572
572
end
573
573
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ def studio_program_with_text(text)
333
333
assert_equal @script_level . script , user_script . script
334
334
assert_equal @user , user_script . user
335
335
assert_equal script_start_date . to_i , user_script . started_at . to_i
336
- assert user_script . started_at != user_script . last_progress_at
336
+ # assert user_script.started_at != user_script.last_progress_at # I turned off updates
337
337
assert user_script . assigned_at . nil?
338
338
assert user_script . completed_at . nil?
339
339
end
You can’t perform that action at this time.
0 commit comments