[Update] 修复创建es命令存储校验有效性异常

pull/1945/head
BaiJiangJie 2018-10-24 10:29:40 +08:00
parent 1bfef829f3
commit cdf8398169
1 changed files with 5 additions and 1 deletions

View File

@ -144,7 +144,11 @@ class CommandStorageCreateAPI(APIView):
def is_valid(storage_data):
if storage_data.get('TYPE') == 'server':
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()