app/controllers/maestrano/synchronizations_controller.rb in maestrano-connector-rails-2.3.0 vs app/controllers/maestrano/synchronizations_controller.rb in maestrano-connector-rails-2.3.1
- old
+ new
@@ -69,15 +69,14 @@
render json: h, status: code
end
def organization_status(organization)
- last_sync = organization.synchronizations.last
if Maestrano::Connector::Rails::SynchronizationJob.find_running_job(organization.id)
'RUNNING'
elsif Maestrano::Connector::Rails::SynchronizationJob.find_job(organization.id)
'ENQUEUED'
else
- last_sync&.status || 'DISABLED'
+ organization.synchronizations.last&.status || 'DISABLED'
end
end
end