From 7830f34dc360e9d90a3f2a6c1698ed92d867a413 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 5 Oct 2018 22:34:34 +0000 Subject: [PATCH] Makes lazy reversals not lazy; prevents errors from manifesting out of scope. --- evennia/accounts/accounts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evennia/accounts/accounts.py b/evennia/accounts/accounts.py index bd1fb4f573..6631911dc8 100644 --- a/evennia/accounts/accounts.py +++ b/evennia/accounts/accounts.py @@ -16,7 +16,7 @@ from django.conf import settings from django.contrib.auth import password_validation from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError -from django.urls import reverse_lazy +from django.urls import reverse from django.utils import timezone from evennia.typeclasses.models import TypeclassBase from evennia.accounts.manager import AccountManager @@ -201,7 +201,7 @@ class DefaultAccount(with_metaclass(TypeclassBase, AccountDB)): https://docs.djangoproject.com/en/2.1/ref/models/instances/#get-absolute-url """ - try: return reverse_lazy('account-detail', kwargs={'pk': self.pk, 'slug': slugify(self.name)}) + try: return reverse('account-detail', kwargs={'pk': self.pk, 'slug': slugify(self.name)}) except: return '#' def get_delete_url(self): @@ -225,7 +225,7 @@ class DefaultAccount(with_metaclass(TypeclassBase, AccountDB)): Returns a link to this object's entry within the Django Admin panel. """ content_type = ContentType.objects.get_for_model(self.__class__) - return reverse_lazy("admin:%s_%s_change" % (content_type.app_label, content_type.model), args=(self.id,)) + return reverse("admin:%s_%s_change" % (content_type.app_label, content_type.model), args=(self.id,)) # session-related methods