Skip to content

Commit

Permalink
fix port Not a Number
Browse files Browse the repository at this point in the history
  • Loading branch information
deploy committed Jul 11, 2019
1 parent 002259d commit b4ff9c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,13 +551,15 @@ def add_project():
try:
business = request.form.get('business', "null").strip()
environment = request.form.get('environment', "null").strip()
project = request.form.get('project', "null").strip()
project = request.form.get('project', "null").strip().lower()
program_type = request.form.get('type', "null").strip()
port = str(request.form.get('port', "0")).strip()
git = request.form.get('git', "null").strip()
branch = request.form.get('branch', "null").strip()
if not port:
port = '0'
if post.isdigit():
return json.dumps({'status':'parameter error. port Not a Number'})

if project == "null" or environment == "null" or branch == "null" or program_type == "null" or git == "null":
raise Exception('ERROR: parameter error')
Expand Down

0 comments on commit b4ff9c0

Please sign in to comment.