def fix_import_export_id_paths(fieldname):
 fixed_db_id = re.sub('([^/])\\.id', '\\1/.id', fieldname)
 fixed_external_id = re.sub('([^/]):id', '\\1/id', fixed_db_id)
 return fixed_external_id.split('/')

def fix_import_export_id_paths ( fieldname ) : fixed_db_id = re . sub ( '([^/])\\.id' , '\\1/.id' , fieldname ) fixed_external_id = re . sub ( '([^/]):id' , '\\1/id' , fixed_db_id ) return fixed_external_id . split ( '/' )
fixes the id fields in import and exports .