Browse Source

Merge pull request #113 from falconbaby/master

bugfix: hostgroup添加hosts时未处理前后空格
laiwei 6 years ago
parent
commit
a5a31f94b7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rrd/view/portal/host.py

+ 1 - 1
rrd/view/portal/host.py

@@ -123,7 +123,7 @@ def host_add_post():
         return jsonify(msg='hosts is blank')
 
     host_arr = hosts.splitlines()
-    safe_host_arr = [h for h in host_arr if h]
+    safe_host_arr = [h.strip() for h in host_arr if h]
     if not safe_host_arr:
         return jsonify(msg='hosts is blank')