Send error message only if there is an error
This commit is contained in:
parent
8e9315b12d
commit
ca099d8c83
1 changed files with 8 additions and 7 deletions
|
@ -69,6 +69,7 @@ class Command(BaseCommand):
|
||||||
'w',
|
'w',
|
||||||
encoding='utf-8') as f:
|
encoding='utf-8') as f:
|
||||||
f.write(json.dumps(result_dict))
|
f.write(json.dumps(result_dict))
|
||||||
|
if error_dict:
|
||||||
email_data = {
|
email_data = {
|
||||||
'subject': 'Check VM Templates ERROR',
|
'subject': 'Check VM Templates ERROR',
|
||||||
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||||
|
|
Loading…
Add table
Reference in a new issue