Skip to content

Commit

Permalink
Fix reservation user not being saved by mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
matti-lamppu committed Sep 12, 2024
1 parent 2bc8137 commit f257dca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def validate(self, data: dict[str, Any], prefill_from_profile: bool = True) -> d
data["buffer_time_before"], data["buffer_time_after"] = self._calculate_buffers(begin, end, reservation_units)

request_user: AnyUser = self.context["request"].user
data["user"] = request_user if request_user.is_anonymous else None
data["user"] = None if request_user.is_anonymous else request_user
data["reservee_used_ad_login"] = (
False if request_user.is_anonymous else getattr(request_user.id_token, "is_ad_login", False)
)
Expand Down

0 comments on commit f257dca

Please sign in to comment.