From e599bca95175e099fbfe9c4e270d1c0c84b4045c Mon Sep 17 00:00:00 2001 From: xinwen Date: Thu, 18 Feb 2021 15:07:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=91=BD=E4=BB=A4=E5=AD=98=E5=82=A8=20e?= =?UTF-8?q?s=20=E7=B1=BB=E5=9E=8B=E4=B8=BB=E6=9C=BA=E5=B8=A6=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=8D=E5=AF=86=E7=A0=81=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/serializers/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/terminal/serializers/storage.py b/apps/terminal/serializers/storage.py index 24d619540..7cc0628ba 100644 --- a/apps/terminal/serializers/storage.py +++ b/apps/terminal/serializers/storage.py @@ -157,7 +157,7 @@ def command_storage_es_host_format_validator(host): raise serializers.ValidationError(default_error_msg) if ':' not in h.netloc: raise serializers.ValidationError(default_error_msg) - _host, _port = h.netloc.split(':') + _host, _port = h.netloc.rsplit(':', maxsplit=1) if not _host: error_msg = _('Host invalid') raise serializers.ValidationError(error_msg)