Command response dynamic
* adds a check whether the mail could be sent properly or not and changes the resulting response
This commit is contained in:
1 parent
1f7f9c8964
commit
415089084e
1 file changed
+4
-1
@@ -131,4 +131,7 @@ class Command(BaseKonovaCommand):
|
||||
]
|
||||
)
|
||||
success = mail.send()
|
||||
self._write_success(f"Mails with zip as attachment sent to {admin_mails}.")
|
||||
if success == 1:
|
||||
self._write_success(f"Mails with zip as attachment sent to {admin_mails}.")
|
||||
else:
|
||||
self._write_error(f"Something went wrong during mail sending. Returned sending code was '{success}'")
|
||||
Reference in new issue
Block a user