Skip to content
Snippets Groups Projects
Commit 86df7157 authored by Fredrik Jonsson's avatar Fredrik Jonsson
Browse files

Fix to get_full_name in user migration.

parent 2fd7165b
No related branches found
No related tags found
No related merge requests found
...@@ -50,9 +50,7 @@ class Command(BaseCommand): ...@@ -50,9 +50,7 @@ class Command(BaseCommand):
def get_full_name(self, user): def get_full_name(self, user):
full_name = user.get('field_otf_real_name', None) full_name = user.get('field_otf_real_name', None)
try: try:
# The Drupal data structure includes a language reference. full_name = full_name['safe_value']
# The default is 'und' (undefined).
full_name = full_name['und'][0]['safe_value']
except (KeyError, TypeError): except (KeyError, TypeError):
full_name = user['name'] full_name = user['name']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment