diff options
| author | Teddy Wing | 2017-08-02 12:36:16 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-08-02 12:36:16 +0200 |
| commit | 533804ec2755ba6564122cb4d43a7f8769d9d1ee (patch) | |
| tree | a75e06c7d52dfe4d937863ff3ae5029871ac8464 /app/services | |
| parent | 0a3221c194115fc039577064590a6f4eb6f33a8a (diff) | |
| download | chouette-core-533804ec2755ba6564122cb4d43a7f8769d9d1ee.tar.bz2 | |
ParentImportNotifier: Use `Import.finished_statuses`
Instead of manually defining the finished statuses, use the method
that's already defined on `Import` to get them.
The only unfortunate part is that we now had to muss up our `Import`
code and convert those methods to class methods in order for them to be
accessible to `ParentImportNotifier` as well as its instance methods.
Refs #3511
Diffstat (limited to 'app/services')
| -rw-r--r-- | app/services/parent_import_notifier.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/parent_import_notifier.rb b/app/services/parent_import_notifier.rb index 8581cb97a..47e6755e4 100644 --- a/app/services/parent_import_notifier.rb +++ b/app/services/parent_import_notifier.rb @@ -8,7 +8,7 @@ class ParentImportNotifier Import .where( notified_parent_at: nil, - status: [:failed, :successful, :aborted, :canceled] + status: Import.finished_statuses ) .where.not(parent: nil) end |
