diff --git a/lib/galaxy/managers/export_tracker.py b/lib/galaxy/managers/export_tracker.py index d9df1063266d..1f70d9e84265 100644 --- a/lib/galaxy/managers/export_tracker.py +++ b/lib/galaxy/managers/export_tracker.py @@ -44,7 +44,7 @@ def set_export_association_metadata(self, export_association_id: int, export_met export_association: StoreExportAssociation = self.session.execute(stmt).scalars().one() except NoResultFound: raise ObjectNotFound("Cannot set export metadata. Reason: Export association not found") - export_association.export_metadata = export_metadata.json() # type:ignore[assignment] + export_association.export_metadata = export_metadata.model_dump_json() # type:ignore[assignment] with transaction(self.session): self.session.commit() diff --git a/lib/galaxy/managers/notification.py b/lib/galaxy/managers/notification.py index 47b62142a43b..cbb1265f26ce 100644 --- a/lib/galaxy/managers/notification.py +++ b/lib/galaxy/managers/notification.py @@ -291,7 +291,9 @@ def update_user_notification_preferences( """Updates the user's notification preferences with the requested changes.""" notification_preferences = self.get_user_notification_preferences(user) notification_preferences.update(request.preferences) - user.preferences[NOTIFICATION_PREFERENCES_SECTION_NAME] = notification_preferences.json() # type:ignore[index] + user.preferences[NOTIFICATION_PREFERENCES_SECTION_NAME] = ( + notification_preferences.model_dump_json() + ) # type:ignore[index] with transaction(self.sa_session): self.sa_session.commit() return notification_preferences