From c8731f318b65aaa6e692487cbddb50c618129695 Mon Sep 17 00:00:00 2001 From: Helmy Giacoman Date: Mon, 2 Dec 2024 11:43:15 +0100 Subject: [PATCH 1/2] Fix index serializing issue SDESK-7441 --- server/planning/types/common.py | 6 +++--- server/planning/types/event.py | 2 +- server/planning/types/planning.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/planning/types/common.py b/server/planning/types/common.py index db197846a..33479d81e 100644 --- a/server/planning/types/common.py +++ b/server/planning/types/common.py @@ -172,9 +172,9 @@ class CoverageInternalPlanning: "include_in_parent": True, "dynamic": False, "properties": { - "qcode": fields.Keyword, - "name": fields.Keyword, - "scheme": fields.Keyword, + "qcode": {"type": "keyword"}, + "name": {"type": "keyword"}, + "scheme": {"type": "keyword"}, }, } ), diff --git a/server/planning/types/event.py b/server/planning/types/event.py index 217c76da3..bce5a3d66 100644 --- a/server/planning/types/event.py +++ b/server/planning/types/event.py @@ -152,7 +152,7 @@ class EventResourceModel(BasePlanningModel, LockFieldsMixin): # Event Details # NewsML-G2 Event properties See IPTC-G2-Implementation_Guide 15.2 - name: str + name: str | None = None definition_short: str | None = None definition_long: str | None = None internal_note: str | None = None diff --git a/server/planning/types/planning.py b/server/planning/types/planning.py index da359db64..d7762341e 100644 --- a/server/planning/types/planning.py +++ b/server/planning/types/planning.py @@ -93,7 +93,7 @@ class PlanningResourceModel(BasePlanningModel, LockFieldsMixin): { "type": "nested", "properties": { - "coverage_id": fields.Keyword, + "coverage_id": {"type": "keyword"}, "planning": { "type": "object", "properties": { From 84c6f2c2dc5299ca9d761be2198aafb38d9129fd Mon Sep 17 00:00:00 2001 From: Helmy Giacoman Date: Mon, 2 Dec 2024 11:46:20 +0100 Subject: [PATCH 2/2] Remove not needed import SDESK-7441 --- server/planning/types/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/planning/types/event.py b/server/planning/types/event.py index bce5a3d66..d057b608b 100644 --- a/server/planning/types/event.py +++ b/server/planning/types/event.py @@ -2,7 +2,7 @@ from datetime import datetime from typing import Annotated, Any -from content_api.items.model import CVItem, ContentAPIItem, Place +from content_api.items.model import CVItem, Place from superdesk.utc import utcnow from superdesk.core.resources import fields, dataclass