From faf1092c7a5662ae6300a853e26effbfe5f69c92 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 26 Mar 2026 21:50:48 +0100 Subject: [PATCH] serialise --- changedetectionio/store/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/changedetectionio/store/__init__.py b/changedetectionio/store/__init__.py index a274ee8f9..9971f4e97 100644 --- a/changedetectionio/store/__init__.py +++ b/changedetectionio/store/__init__.py @@ -422,6 +422,14 @@ class ChangeDetectionStore(DatastoreUpdatesMixin, FileSavingDataStore): # Is saved as {uuid}/tag.json settings_copy['application']['tags'] = {} + # Serialize BrowserProfile Pydantic instances to plain dicts for JSON storage + raw_profiles = settings_copy['application'].get('browser_profiles', {}) + from changedetectionio.model.browser_profile import BrowserProfile + settings_copy['application']['browser_profiles'] = { + k: v.model_dump() if isinstance(v, BrowserProfile) else v + for k, v in raw_profiles.items() + } + return { 'note': 'Settings file - watches are in {uuid}/watch.json, tags are in {uuid}/tag.json', 'app_guid': self.__data.get('app_guid'),