0002-a2_rbac-do-not-use-lazy-string-in-model-name-34774.patch
src/authentic2/a2_rbac/management.py | ||
---|---|---|
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 |
from django.utils import six |
18 |
from django.utils.translation import ugettext_lazy as _ |
|
18 |
from django.utils.translation import ugettext_lazy as _, ugettext
|
|
19 | 19 |
from django.utils.text import slugify |
20 | 20 |
from django.contrib.contenttypes.models import ContentType |
21 | 21 | |
... | ... | |
113 | 113 |
admin_role, created = Role.objects.get_or_create( |
114 | 114 |
slug=slug, |
115 | 115 |
defaults=dict( |
116 |
name=_('Manager')))
|
|
116 |
name=ugettext('Manager')))
|
|
117 | 117 |
admin_role.add_self_administration() |
118 |
if not created and admin_role.name != _('Manager'):
|
|
119 |
admin_role.name = _('Manager')
|
|
118 |
if not created and admin_role.name != ugettext('Manager'):
|
|
119 |
admin_role.name = ugettext('Manager')
|
|
120 | 120 |
admin_role.save() |
121 | 121 | |
122 | 122 |
for ct in cts: |
123 |
- |