account for empty user ids in description
@@ -12,6 +12,7 @@ def migrate_url_to_uid(apps, schema_editor):
Creator = apps.get_model('hs_core.Creator')
combined_list = list(chain(Contributor.objects.all(), Creator.objects.all()))
for party in combined_list:
+ if party.description:
id = re.sub("[^0-9]", "", party.description)
party.hydroshare_user_id = id
party.save()
