Skip to content

Commit f68d116

Browse files
committed
nobil migration: ignore if no realtime data exists
1 parent 8fc8310 commit f68d116

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/evmap_backend/data_sources/nobil/migrations/0003_remove_nobilconnector_charging_station_and_more.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77

88
def get_nobil_data(apps, schema_editor):
9+
NobilRealtimeData = apps.get_model("nobil", "NobilRealtimeData")
10+
if NobilRealtimeData.objects.count() == 0:
11+
return
12+
913
get_data_source("nobil").pull_data()
1014

1115

0 commit comments

Comments
 (0)