diff options
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r-- | ishtar_common/utils.py | 2 |
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), |