Skip to content

Commit ffc65ee

Browse files
committed
ref(management): handle no build for deploys a bit more cleanly
1 parent 437f9cb commit ffc65ee

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

rootfs/api/management/commands/load_db_state_to_k8s.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ def handle(self, *args, **options):
2424
# deploy applications
2525
print("Deploying available applications")
2626
for application in App.objects.all():
27-
try:
28-
rel = application.release_set.latest()
29-
application.deploy(rel)
30-
except EnvironmentError as e:
31-
if str(e) != 'No build associated with this release':
32-
raise
27+
if application.build is None:
3328
print('WARNING: {} has no build associated with '
3429
'its latest release. Skipping deployment...'.format(application))
35-
pass
30+
continue
31+
32+
rel = application.release_set.latest()
33+
application.deploy(rel)
3634

3735
print("Done Publishing DB state to kubernetes.")

0 commit comments

Comments
 (0)