Projet

Général

Profil

0001-stick-attachments-links-to-backoffice-when-shown-on-.patch

Thomas Noël, 15 octobre 2020 16:04

Télécharger (1,12 ko)

Voir les différences:

Subject: [PATCH] stick attachments links to backoffice when shown on
 backoffice (#47704)

 wcs/wf/attachment.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
wcs/wf/attachment.py
63 63
                if not isinstance(p, AttachmentEvolutionPart):
64 64
                    continue
65 65
                if os.path.basename(p.filename) == fn:
66
                    return redirect( '%sfiles/attachment-%s/%s' % (
67
                            self.filled.get_url(), fn, urllib.quote(p.base_filename)))
66
                    is_in_backoffice = bool(get_request() and get_request().is_in_backoffice())
67
                    return redirect('%sfiles/attachment-%s/%s' % (
68
                            self.filled.get_url(backoffice=is_in_backoffice), fn, urllib.quote(p.base_filename)))
68 69

  
69 70
    raise TraversalError()
70 71

  
71
-