Commit ddbe89a2 authored by Robert's avatar Robert

Fix link in case of non-existing entity slug, refs #637

parent 692e78fd
Pipeline #1498 failed with stage
in 1 minute and 42 seconds
......@@ -48,11 +48,12 @@ class EntityLinkExtension:
if match:
entity, slug, name = get_entity(match)
entity_url = full_url(entity.get_absolute_url())
if entity and entity.is_group:
return 'group://%d@%s' % (entity.id, entity_url)
elif entity:
return 'gestalt://%d@%s' % (entity.id, entity_url)
if entity:
entity_url = full_url(entity.get_absolute_url())
if entity.is_group:
return 'group://%d@%s' % (entity.id, entity_url)
else:
return 'gestalt://%d@%s' % (entity.id, entity_url)
else:
return self.ENTITY_NONE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment