fix tag humanization

This commit is contained in:
Dmitriy Kuzmenko 2019-11-12 12:21:19 +03:00
parent 5290e33ea7
commit 9d208610df

View File

@ -16,9 +16,10 @@ class Command(BaseCommand):
for tag in tags:
value = tag.label
for k, v in value.items():
sp = v.split('_')
v = ' '.join([sp[0].capitalize()] + sp[1:])
tag.label[k] = v
if isinstance(v, str) and '_' in v:
sp = v.split('_')
v = ' '.join([sp[0].capitalize()] + sp[1:])
tag.label[k] = v
tag.save()
for trans in translation: