We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8f5966 commit 0c83759Copy full SHA for 0c83759
1 file changed
registrations/serializers.py
@@ -129,6 +129,10 @@ def save(self):
129
user.profile.department = department
130
user.profile.position = position
131
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
136
user.profile.save()
137
except Exception:
138
raise serializers.ValidationError("Could not create user profile.")
0 commit comments