diff --git a/app/jobs/touch_sync_job.rb b/app/jobs/touch_sync_job.rb index d4c83be73..3beaf52e5 100644 --- a/app/jobs/touch_sync_job.rb +++ b/app/jobs/touch_sync_job.rb @@ -14,7 +14,7 @@ class TouchSyncJob < ApplicationJob else result = Reposync::SyncBranchService.call(sync_repository.repo_name, touchable.external_branch_name, sync_repository.sync_direction) end - if result.is_a?(Array) + if result.is_a?(Array) && result[0].to_i == 0 touchable.update_attributes!({sync_status: 1, sync_time: Time.now}) else touchable.update_attributes!({sync_status: 2, sync_time: Time.now})