mirror of https://github.com/jumpserver/jumpserver
[Update] 修复创建es命令存储校验有效性异常
parent
1bfef829f3
commit
cdf8398169
|
@ -144,7 +144,11 @@ class CommandStorageCreateAPI(APIView):
|
||||||
def is_valid(storage_data):
|
def is_valid(storage_data):
|
||||||
if storage_data.get('TYPE') == 'server':
|
if storage_data.get('TYPE') == 'server':
|
||||||
return True
|
return True
|
||||||
storage = jms_storage.get_log_storage(storage_data)
|
try:
|
||||||
|
storage = jms_storage.get_log_storage(storage_data)
|
||||||
|
except Exception:
|
||||||
|
return False
|
||||||
|
|
||||||
return storage.ping()
|
return storage.ping()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue