aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/clean_up.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/clean_up.rb b/app/models/clean_up.rb
index a708a77ea..9cf2389c9 100644
--- a/app/models/clean_up.rb
+++ b/app/models/clean_up.rb
@@ -124,6 +124,12 @@ class CleanUp < ApplicationModel
Chouette::Route.where("id not in (select distinct route_id from journey_patterns)").destroy_all
end
+ def destroy_empty
+ destroy_vehicle_journeys
+ destroy_journey_patterns
+ destroy_routes
+ end
+
def overlapping_periods
self.end_date = self.begin_date if self.date_type != 'between'
Chouette::TimeTablePeriod.where('(period_start, period_end) OVERLAPS (?, ?)', self.begin_date, self.end_date)