mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 13:37:17 +02:00
Makes lazy reversals not lazy; prevents errors from manifesting out of scope.
This commit is contained in:
parent
fc55f0f2a1
commit
7830f34dc3
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue