def _update_user(self, row): try: player = Player.objects.get(short_id=row[0]) except ObjectDoesNotExist: print("No player with shortID {}. Creating.".format(row[0])) player = Player(short_id=row[0].upper()) player.first_name = row[1] player.last_name = row[2] if row[3] != "": player.handle = row[3] player.origin = row[4] + ", " + row[5] player.save()