Skip to content

Commit

Permalink
Remove depid from short url
Browse files Browse the repository at this point in the history
  • Loading branch information
maricaantonacci committed Nov 24, 2020
1 parent 5d25556 commit 9f8023d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/deployments/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ def unlockdeployment(depid=None):
return redirect(url_for('deployments_bp.showdeployments'))


def preprocess_outputs(browser, depid, outputs, stoutputs):
def preprocess_outputs(browser, outputs, stoutputs):
for key, value in stoutputs.items():
if value.get("type") == "download-url":
if value.get("action") == "shorturl":
origin_url = urlparse(outputs[key])
try:
shorturl = yourls.url_shorten(outputs[key], depid)
shorturl = yourls.url_shorten(outputs[key])
if shorturl:
outputs[key] = shorturl
except Exception as e:
Expand Down Expand Up @@ -156,7 +156,7 @@ def depoutput(depid=None):
browser = request.user_agent.browser
version = request.user_agent.version and int(request.user_agent.version.split('.')[0])

preprocess_outputs(dict(name = browser, version = version), depid, outputs, stoutputs)
preprocess_outputs(dict(name = browser, version = version), outputs, stoutputs)

return render_template('depoutput.html',
deployment=dep,
Expand Down

0 comments on commit 9f8023d

Please sign in to comment.