diff --git a/intranet/apps/dataimport/management/commands/import_photos.py b/intranet/apps/dataimport/management/commands/import_photos.py index 83b2241ba3e..30e7588d388 100644 --- a/intranet/apps/dataimport/management/commands/import_photos.py +++ b/intranet/apps/dataimport/management/commands/import_photos.py @@ -28,8 +28,8 @@ def handle(self, *args, **options): for path in all_photos: user = None if IS_STAFF: - if "-" in path.stem: - last_name, first_name = path.stem.rsplit("-", 1) + if "_" in path.stem: + last_name, first_name = path.stem.rsplit("_", 1) user = get_user_model().objects.filter(first_name=first_name, last_name=last_name).first() else: try: