From 750f549e52ffb89830b484d0f6e449467c6a57f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Se=CC=81bastien=20De=CC=81le=CC=80ze?=
 <sebastien.deleze@rero.ch>
Date: Fri, 21 Aug 2020 15:00:21 +0200
Subject: [PATCH] documents: fix permalink
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

After the simplification of URLs for organisations, the permalink to document's detail is not working anymore. This commit fixes the permalink to match the new URL.

* Changes configuration for `SONAR_DOCUMENTS_PERMALINK` to make permalink work again.
* Closes #282.

Co-Authored-by: Sébastien Délèze <sebastien.deleze@rero.ch>
---
 sonar/modules/documents/config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sonar/modules/documents/config.py b/sonar/modules/documents/config.py
index 984b5323..6bb34f87 100644
--- a/sonar/modules/documents/config.py
+++ b/sonar/modules/documents/config.py
@@ -29,5 +29,5 @@
 SONAR_DOCUMENTS_ORGANISATIONS_EXTERNAL_FILES = ['csal']
 """Display external files URL for these organisations."""
 
-SONAR_DOCUMENTS_PERMALINK = '{host}organisation/{org}/documents/{pid}'
+SONAR_DOCUMENTS_PERMALINK = '{host}{org}/documents/{pid}'
 """Permalink for accessing documents details."""