summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-06-12 17:59:34 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-06-12 17:59:34 +0200
commitc8f19ffca144e3e940bd0b878bf82f70192780e8 (patch)
tree293c3ed8ef3776251c5eeb64e04ad426eb361851 /ishtar_common
parent3728ddd681c428abf2a686b8b31f6cc95c5972cc (diff)
downloadIshtar-c8f19ffca144e3e940bd0b878bf82f70192780e8.tar.bz2
Ishtar-c8f19ffca144e3e940bd0b878bf82f70192780e8.zip
Fix find test
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index 6331766e1..c3a297174 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -796,7 +796,7 @@ def get_urls_for_model(model, views, own=False, autocomplete=False):
Generate get and show url for a model
"""
urls = [
- url(r'show-{}/(?P<pk>.+)/(?P<type>.+)?$'.format(model.SLUG),
+ url(r'show-{}(?:/(?P<pk>.+))?/(?P<type>.+)?$'.format(model.SLUG),
check_rights(['view_' + model.SLUG, 'view_own_' + model.SLUG])(
getattr(views, 'show_' + model.SLUG)),
name="show-" + model.SLUG),