mirror of https://github.com/jumpserver/jumpserver
fix: custom sms send success but prompt fails
parent
e9f4615caa
commit
281a2d9679
|
@ -39,8 +39,7 @@ class CustomSMS(BaseSMSClient):
|
||||||
kwargs = {'params': params}
|
kwargs = {'params': params}
|
||||||
try:
|
try:
|
||||||
response = action(url=settings.CUSTOM_SMS_URL, verify=False, **kwargs)
|
response = action(url=settings.CUSTOM_SMS_URL, verify=False, **kwargs)
|
||||||
if response.reason != 'OK':
|
response.raise_for_status()
|
||||||
raise JMSException(detail=response.text, code=response.status_code)
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.error('Custom sms error: {}'.format(exc))
|
logger.error('Custom sms error: {}'.format(exc))
|
||||||
raise JMSException(exc)
|
raise JMSException(exc)
|
||||||
|
|
|
@ -60,7 +60,7 @@ def check_registered_tasks(*args, **kwargs):
|
||||||
'perms.tasks.check_asset_permission_will_expired',
|
'perms.tasks.check_asset_permission_will_expired',
|
||||||
'ops.tasks.create_or_update_registered_periodic_tasks', 'perms.tasks.check_asset_permission_expired',
|
'ops.tasks.create_or_update_registered_periodic_tasks', 'perms.tasks.check_asset_permission_expired',
|
||||||
'settings.tasks.ldap.import_ldap_user_periodic', 'users.tasks.check_password_expired_periodic',
|
'settings.tasks.ldap.import_ldap_user_periodic', 'users.tasks.check_password_expired_periodic',
|
||||||
'common.utils.verify_code.send_async', 'assets.tasks.nodes_amount.check_node_assets_amount_period_task',
|
'common.utils.verify_code.send_sms_async', 'assets.tasks.nodes_amount.check_node_assets_amount_period_task',
|
||||||
'users.tasks.check_user_expired', 'orgs.tasks.refresh_org_cache_task',
|
'users.tasks.check_user_expired', 'orgs.tasks.refresh_org_cache_task',
|
||||||
'terminal.tasks.upload_session_replay_to_external_storage', 'terminal.tasks.clean_orphan_session',
|
'terminal.tasks.upload_session_replay_to_external_storage', 'terminal.tasks.clean_orphan_session',
|
||||||
'audits.tasks.clean_audits_log_period', 'authentication.tasks.clean_django_sessions'
|
'audits.tasks.clean_audits_log_period', 'authentication.tasks.clean_django_sessions'
|
||||||
|
|
Loading…
Reference in New Issue