def do_migration(dry=False):
 n_migrated = 0
 for user in get_targets():
  n_migrated += 1
  logger.info('Clearing unclaimed records for {0!r}'.format(user))
  if (not dry):
   user.unclaimed_records = {}
   user.save()
 logger.info('Migrated {0} records.'.format(n_migrated))
 return n_migrated

def do_migration ( dry = False ) : n_migrated = 0 for user in get_targets ( ) : n_migrated += 1 logger . info ( 'Clearing unclaimed records for {0!r}' . format ( user ) ) if ( not dry ) : user . unclaimed_records = { } user . save ( ) logger . info ( 'Migrated {0} records.' . format ( n_migrated ) ) return n_migrated
clear unclaimed_records for confirmed users .