Skip to content

Commit a7ab927

Browse files
committed
fix(misc): import teacher photos should only find staff
1 parent f80a619 commit a7ab927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intranet/apps/dataimport/management/commands/import_photos.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def handle(self, *args, **options):
3030
if IS_STAFF:
3131
if "-" in path.stem:
3232
last_name, first_name = path.stem.rsplit("-", 1)
33-
user = get_user_model().objects.filter(first_name=first_name, last_name=last_name).first()
33+
user = get_user_model().objects.filter(first_name=first_name, last_name=last_name, user_type__in=["teacher", "counselor"]).first()
3434
else:
3535
try:
3636
int(path.stem)

0 commit comments

Comments
 (0)