From 10e00ea0457bf7fc9cfba00c8126cca63ebf0730 Mon Sep 17 00:00:00 2001 From: Greg Stark Date: Tue, 5 Dec 2017 19:26:02 +0000 Subject: check the import_status field before doing SQL operations to check the import url --- app/models/project.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/models/project.rb') diff --git a/app/models/project.rb b/app/models/project.rb index cc530076bf7..e65c5290699 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -657,7 +657,8 @@ class Project < ActiveRecord::Base end def import_started? - import? && import_status == 'started' + # import? does SQL work so only run it if it looks like there's an import running + import_status == 'started' && import? end def import_scheduled? -- cgit v1.2.1