Skip to content

Commit 0c83759

Browse files
committed
Limit access to guest when organization type is Other/OTHR
1 parent c8f5966 commit 0c83759

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

registrations/serializers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ def save(self):
129129
user.profile.department = department
130130
user.profile.position = position
131131
user.profile.phone_number = phone_number
132+
# Limit access to guest when organization type is Other/OTHR
133+
org_type_norm = (organization_type or "").strip().lower()
134+
if org_type_norm in {"other", "othr"}:
135+
user.profile.limit_access_to_guest = True
132136
user.profile.save()
133137
except Exception:
134138
raise serializers.ValidationError("Could not create user profile.")

0 commit comments

Comments
 (0)