qiaofeng1227 пре 2 година
родитељ
комит
5ad60b40f3
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      appmanage/api/utils/docker.py

+ 2 - 2
appmanage/api/utils/docker.py

@@ -74,7 +74,7 @@ def check_appid_include_rq(app_id):
     if app_id == None:
         code = const.ERROR_CLIENT_PARAM_BLANK
         message = "AppID is null"
-    elif re.match('^[a-z0-9]+_[a-z0-9]+$', app_id):
+    elif re.match('^[a-z0-9]+_[a-z0-9]+$', app_id) == None:
         code = const.ERROR_CLIENT_PARAM_Format
         message = "APP name can only be composed of numbers and lowercase letters"
     elif not docker.check_appid_exist(app_id):
@@ -89,7 +89,7 @@ def check_app_id(app_id):
     if app_id == None:
         code = const.ERROR_CLIENT_PARAM_BLANK
         message = "AppID is null"
-    elif re.match('^[a-z0-9]+_[a-z0-9]+$', app_id):
+    elif re.match('^[a-z0-9]+_[a-z0-9]+$', app_id) == None::
         code = const.ERROR_CLIENT_PARAM_Format
         message = "APP name can only be composed of numbers and lowercase letters"
     myLogger.info_logger(code)