diff --git a/netbox/extras/templatetags/custom_links.py b/netbox/extras/templatetags/custom_links.py
index 31cd2281574..849955cd4f4 100644
--- a/netbox/extras/templatetags/custom_links.py
+++ b/netbox/extras/templatetags/custom_links.py
@@ -65,7 +65,7 @@ def custom_links(context, obj):
rendered['link'], rendered['link_target'], cl.button_class, rendered['text']
)
except Exception as e:
- template_code += f'' \
+ template_code += f'' \
f' {cl.name}\n'
# Add grouped links to template