Minor tweaks.
- Legacy-Id: 11343
This commit is contained in:
parent
ee14795563
commit
289dd0c2a9
0
ietf/message/migrations/__init__.py
Normal file
0
ietf/message/migrations/__init__.py
Normal file
|
@ -20,10 +20,11 @@ def plain_name(self):
|
|||
def add_plain_name_aliases(apps, schema_editor):
|
||||
Person = apps.get_model('person','Person')
|
||||
Alias = apps.get_model('person','Alias')
|
||||
print("")
|
||||
for person in Person.objects.all():
|
||||
name = plain_name(person)
|
||||
if name and not Alias.objects.filter(name=name):
|
||||
print("Created alias %-24s for %s" % (name, person.name))
|
||||
print(u"Creating alias %-24s for %s" % (name, person.name))
|
||||
alias = Alias(name=name, person=person)
|
||||
alias.save()
|
||||
|
||||
|
|
Loading…
Reference in a new issue