fix migration notification logic

This commit is contained in:
simon 2023-05-07 12:06:55 +07:00
parent 4376b826c4
commit 5e1167743f
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 8 additions and 8 deletions

View File

@ -201,17 +201,17 @@ class Command(BaseCommand):
response, status_code = ElasticWrap(path).post(data=data)
if status_code == 200:
updated = response.get("updated", 0)
if not updated:
if updated:
self.stdout.write(
self.style.SUCCESS(
f"{updated} videos updated in ta_download"
)
)
else:
self.stdout.write(
" no videos needed updating in ta_download"
)
return
self.stdout.write(
self.style.SUCCESS(
f"{updated} videos updated in ta_download"
)
)
return
message = " 🗙 ta_download auto_start update failed"
self.stdout.write(self.style.ERROR(message))