diff options
| author | Teddy Wing | 2017-08-29 13:23:43 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-08-29 13:23:43 +0200 | 
| commit | 1fd27401056639ac19794375926ba77f9a7db371 (patch) | |
| tree | 8d417f734a9c5e74acb47e511a146d35ed18b7ef /app/models/import.rb | |
| parent | 51198602a7799af366d5d26f3d6fc397a37d13dc (diff) | |
| download | chouette-core-1fd27401056639ac19794375926ba77f9a7db371.tar.bz2 | |
Import#update_status: Clean up status assignment
Clean up this section a tiny bit. Should function the same way as
before.
Diffstat (limited to 'app/models/import.rb')
| -rw-r--r-- | app/models/import.rb | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/import.rb b/app/models/import.rb index d79d93e4a..6c3cba6bc 100644 --- a/app/models/import.rb +++ b/app/models/import.rb @@ -58,12 +58,12 @@ class Import < ActiveRecord::Base        current_step: children_finished_count      } -    status = self.status -    if children_failed_count > 0 -      status = 'failed' -    elsif status_count['successful'] == children_count -      status = 'successful' -    end +    status = +      if children_failed_count > 0 +        'failed' +      elsif status_count['successful'] == children_count +        'successful' +      end      if self.class.finished_statuses.include?(status)        attributes[:ended_at] = Time.now  | 
