Skip to content

Commit

Permalink
Merge pull request #17210 from davelopez/23.1_partial_backport_of_#17058
Browse files Browse the repository at this point in the history
[23.1] Fix `url_for` in tool error reports
  • Loading branch information
mvdbeek committed Dec 19, 2023
2 parents f6c06f6 + af9ad60 commit 1ffcf8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions lib/galaxy/tools/error_reports/plugins/slack.py
Expand Up @@ -8,7 +8,6 @@

import requests

from galaxy import web
from galaxy.util import string_as_bool
from .base_git import BaseGitPlugin

Expand Down Expand Up @@ -38,7 +37,7 @@ def _fill_issue_cache(self, *args, **kwargs):

def submit_report(self, dataset, job, tool, **kwargs):
history_id_encoded = self.app.security.encode_id(dataset.history_id)
history_view_link = web.url_for("/histories/view", id=history_id_encoded, qualified=True)
history_view_link = self.app.url_for("/histories/view", id=history_id_encoded, qualified=True)
error_report_id = str(uuid.uuid4())[0:13]
title = self._generate_error_title(job)

Expand Down
7 changes: 3 additions & 4 deletions lib/galaxy/tools/errors.py
Expand Up @@ -8,7 +8,6 @@
from galaxy import (
model,
util,
web,
)
from galaxy.security.validate_user_input import validate_email_str
from galaxy.util import unicodify
Expand Down Expand Up @@ -159,11 +158,11 @@ def _can_access_dataset(self, user):
def create_report(self, user, email="", message="", redact_user_details_in_bugreport=False, **kwd):
hda = self.hda
job = self.job
host = web.url_for("/", qualified=True)
host = self.app.url_for("/", qualified=True)
history_id_encoded = self.app.security.encode_id(hda.history_id)
history_view_link = web.url_for("/histories/view", id=history_id_encoded, qualified=True)
history_view_link = self.app.url_for("/histories/view", id=history_id_encoded, qualified=True)
hda_id_encoded = self.app.security.encode_id(hda.id)
hda_show_params_link = web.url_for(
hda_show_params_link = self.app.url_for(
controller="dataset", action="details", dataset_id=hda_id_encoded, qualified=True
)
# Build the email message
Expand Down

0 comments on commit 1ffcf8e

Please sign in to comment.