Commit 37460267 by Fábián János

ERROE:django error __str__ returned non-string (type __proxy__)

django.utils.translation.ugettext_lazy() is deprecated
use ugettext instead of ugettext_lazy
parent da670de6
...@@ -202,7 +202,7 @@ class Operation(object): ...@@ -202,7 +202,7 @@ class Operation(object):
return self.activity_name return self.activity_name
except AttributeError: except AttributeError:
try: try:
return self.name._proxy____args[0] # ewww! return self.name # ewww!
except AttributeError: except AttributeError:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"Set Operation.activity_name to an ugettext_nooped " "Set Operation.activity_name to an ugettext_nooped "
......
...@@ -35,7 +35,7 @@ from django.core.exceptions import PermissionDenied, SuspiciousOperation ...@@ -35,7 +35,7 @@ from django.core.exceptions import PermissionDenied, SuspiciousOperation
from django.urls import reverse from django.urls import reverse
from django.db.models import Q from django.db.models import Q
from django.utils import timezone from django.utils import timezone
from django.utils.translation import ugettext_lazy as _, ugettext_noop from django.utils.translation import ugettext as _, ugettext_noop
from re import search from re import search
from sizefield.utils import filesizeformat from sizefield.utils import filesizeformat
......
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