Commit 8bb412e3 by Kálmán Viktor

dashboard: nicer code

parent 97d83242
......@@ -351,8 +351,7 @@ class VmDetailView(CheckedDetailView):
# can link template
context['can_link_template'] = (
instance.template.has_level(user, "operator")
if instance.template else False
instance.template and instance.template.has_level(user, "operator")
return context
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 sign in to comment