diff --git a/server/polar/customer_seat/schemas.py b/server/polar/customer_seat/schemas.py index ab17afe4ea..e9decaadda 100644 --- a/server/polar/customer_seat/schemas.py +++ b/server/polar/customer_seat/schemas.py @@ -96,6 +96,9 @@ class CustomerSeat(TimestampedSchema): status: SeatStatus = Field(..., description="Status of the seat") customer_id: UUID | None = Field(None, description="The assigned customer ID") customer_email: str | None = Field(None, description="The assigned customer email") + invitation_token: str | None = Field( + None, description="Invitation token for claiming the seat" + ) invitation_token_expires_at: datetime | None = Field( None, description="When the invitation token expires" ) diff --git a/server/tests/customer_seat/test_endpoints.py b/server/tests/customer_seat/test_endpoints.py index f5306c2243..f11eff7809 100644 --- a/server/tests/customer_seat/test_endpoints.py +++ b/server/tests/customer_seat/test_endpoints.py @@ -135,7 +135,8 @@ async def test_assign_seat_with_email_success( data = response.json() assert data["status"] == "pending" assert data["subscription_id"] == str(subscription_with_seats.id) - assert "invitation_token" not in data + assert "invitation_token" in data + assert data["invitation_token"] is not None assert "customer" not in data @pytest.mark.auth(SEAT_AUTH)