Don't error out link resolution if user doesn't has permission for the object argument. This issue manifests during the forcefull check in attempt of issue GL #237. Solved and test added.

This commit is contained in:
Roberto Rosario
2015-10-26 02:15:53 -04:00
parent 31846a739d
commit f4a461e5a5
3 changed files with 87 additions and 4 deletions

View File

@@ -285,7 +285,12 @@ class Link(object):
view_name=view_name, args=args, kwargs=kwargs, asvar=None
)
resolved_link.url = node.render(context)
try:
resolved_link.url = node.render(context)
except Exception as exception:
logger.error(
'Error resolving link "%s" URL; %s', self.text, exception
)
# This is for links that should be displayed but that are not clickable
if self.conditional_disable: