From 2cf8dc027f339056c69a23fde32146c1425892c7 Mon Sep 17 00:00:00 2001 From: Anselme Irumva Date: Fri, 17 Jul 2026 15:06:07 +0200 Subject: [PATCH] CORE-545 Make `experiments` field optional in user preferences model --- backend/app/users/types.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/users/types.py b/backend/app/users/types.py index f696fa23..b0d962d7 100644 --- a/backend/app/users/types.py +++ b/backend/app/users/types.py @@ -1,6 +1,6 @@ from dataclasses import field from datetime import datetime -from typing import Mapping, Any, TypeAlias, Union +from typing import Mapping, Any, TypeAlias, Union, Optional from pydantic import BaseModel, Field, model_validator, json @@ -55,7 +55,7 @@ class UserPreferencesRepositoryUpdateRequest(BaseModel): UUID - The client ID (UUID) assigned to the device client (Browser). """ - experiments: Experiments = Field(default_factory=dict) + experiments: Optional[Experiments] = None """ experiments - A dictionary mapping experiment namespaces to their configuration Each experiment can have either a simple string value or a nested configuration. @@ -95,7 +95,7 @@ class UserPreferencesUpdateRequest(BaseModel): UUID - The client ID (UUID) assigned to the device client (Browser). """ - experiments: Experiments = Field(default_factory=dict) + experiments: Optional[Experiments] = None """ experiments - A dictionary mapping experiment namespaces to their configuration Each experiment can have either a simple string value or a nested configuration.