fix tag humanization
This commit is contained in:
parent
5290e33ea7
commit
9d208610df
|
|
@ -16,9 +16,10 @@ class Command(BaseCommand):
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
value = tag.label
|
value = tag.label
|
||||||
for k, v in value.items():
|
for k, v in value.items():
|
||||||
sp = v.split('_')
|
if isinstance(v, str) and '_' in v:
|
||||||
v = ' '.join([sp[0].capitalize()] + sp[1:])
|
sp = v.split('_')
|
||||||
tag.label[k] = v
|
v = ' '.join([sp[0].capitalize()] + sp[1:])
|
||||||
|
tag.label[k] = v
|
||||||
tag.save()
|
tag.save()
|
||||||
|
|
||||||
for trans in translation:
|
for trans in translation:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user