1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Issue #140: Fixed Unicode bug in message (ObjectEditView)

This commit is contained in:
Jeremy Stretch
2016-06-30 18:04:14 -04:00
parent c9bf10421b
commit 2829303c74

View File

@ -137,9 +137,9 @@ class ObjectEditView(View):
msg = 'Created ' if obj_created else 'Modified '
msg += self.model._meta.verbose_name
if hasattr(obj, 'get_absolute_url'):
msg += ' <a href="{}">{}</a>'.format(obj.get_absolute_url(), obj)
msg = '{} <a href="{}">{}</a>'.format(msg, obj.get_absolute_url(), obj)
else:
msg += ' {}'.format(obj)
msg = '{} {}'.format(msg, obj)
messages.success(request, msg)
if obj_created:
UserAction.objects.log_create(request.user, obj, msg)