diff --git a/package-lock.json b/package-lock.json index 98fe562e0..d83a8cf5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "superdesk-planning", - "version": "2.7.0-rc8", + "version": "2.8.0-dev", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1731,9 +1731,9 @@ } }, "caniuse-db": { - "version": "1.0.30001633", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001633.tgz", - "integrity": "sha512-Ba2XtmlCeKAixOIoWRcoXY0aKjKvdckV/yDVg5sVm4SIjyeFZgtCI4smJ9pLCC57bHUtw5VWhpjWGqES4k9h6A==", + "version": "1.0.30001639", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001639.tgz", + "integrity": "sha512-Y4Ewb9g+3jQXeWXoe5c5nMtzrAl49d9ffxe+PANiSpjCWLkPTMsW56vCW1xYKqLOLt/IO3HCEOaMPpq5F7BqOw==", "dev": true }, "caseless": { @@ -2054,20 +2054,7 @@ "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } + "string-width": "^4.2.0" } }, "clone": { @@ -3188,9 +3175,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.802", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.802.tgz", - "integrity": "sha512-TnTMUATbgNdPXVSHsxvNVSG0uEd6cSZsANjm8c9HbvflZVVn1yTRcmVXYT1Ma95/ssB/Dcd30AHweH2TE+dNpA==", + "version": "1.4.816", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.816.tgz", + "integrity": "sha512-EKH5X5oqC6hLmiS7/vYtZHZFTNdhsYG5NVPRN6Yn0kQHNBlT59+xSM8HBy66P5fxWpKgZbPqb+diC64ng295Jw==", "dev": true }, "elliptic": { @@ -3267,19 +3254,21 @@ "dev": true }, "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "requires": { "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true } } }, @@ -7010,13 +6999,13 @@ } }, "socket.io-adapter": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz", - "integrity": "sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==", + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", + "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", "dev": true, "requires": { "debug": "~4.3.4", - "ws": "~8.11.0" + "ws": "~8.17.1" } }, "source-map": { @@ -7039,6 +7028,12 @@ "requires": { "is-number": "^7.0.0" } + }, + "ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true } } }, @@ -12101,7 +12096,7 @@ } }, "superdesk-core": { - "version": "github:superdesk/superdesk-client-core#61d411e5074fd6736693e67dcdf5b503d91198a8", + "version": "github:superdesk/superdesk-client-core#89d683b5687f00d08c2f3275cd5320fd8b6ae1eb", "from": "github:superdesk/superdesk-client-core#develop", "dev": true, "requires": { @@ -12199,7 +12194,7 @@ "sass-loader": "6.0.6", "shortid": "2.2.8", "style-loader": "0.20.2", - "superdesk-ui-framework": "^3.1.9", + "superdesk-ui-framework": "3.1.9", "ts-loader": "3.5.0", "typescript": "4.9.5", "uuid": "8.3.1", @@ -13100,9 +13095,9 @@ "dev": true }, "qs": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.2.tgz", + "integrity": "sha512-x+NLUpx9SYrcwXtX7ob1gnkSems4i/mGZX5SlYxwIau6RrUSODO89TR/XDGGpn5RPWSYIB+aSfuSlV5+CmbTBg==", "dev": true, "requires": { "side-channel": "^1.0.6" @@ -14065,52 +14060,6 @@ "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", "dev": true }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/server/planning/commands/export_to_newsroom.py b/server/planning/commands/export_to_newsroom.py index aceb8f22c..1d4fd5c50 100644 --- a/server/planning/commands/export_to_newsroom.py +++ b/server/planning/commands/export_to_newsroom.py @@ -73,7 +73,6 @@ def run(self, resource_url, assets_url, size=None): logger.info("Completed export events and planning.") def _fetch_items(self, fetch_callback): - """""" query = { "query": { "bool": { diff --git a/server/planning/events/events.py b/server/planning/events/events.py index 62b80fa02..999fbd533 100644 --- a/server/planning/events/events.py +++ b/server/planning/events/events.py @@ -121,7 +121,6 @@ def post_in_mongo(self, docs, **kwargs): for doc in docs: self._resolve_defaults(doc) - doc.pop("pubstatus", None) set_ingest_version_datetime(doc) self.on_create(docs) diff --git a/server/planning/events/events_tests.py b/server/planning/events/events_tests.py index f8a649dbd..1fb210264 100644 --- a/server/planning/events/events_tests.py +++ b/server/planning/events/events_tests.py @@ -135,6 +135,27 @@ def test_get_recurring_timeline(self): self.assertEquals(e["dates"]["start"], expected_time) expected_time += timedelta(days=1) + def test_create_cancelled_event(self): + with self.app.app_context(): + service = get_resource_service("events") + service.post_in_mongo( + [ + { + "guid": "test", + "name": "Test Event", + "pubstatus": "cancelled", + "dates": { + "start": datetime.now(), + "end": datetime.now() + timedelta(days=1), + }, + } + ] + ) + + event = service.find_one(req=None, guid="test") + assert event is not None + assert event["pubstatus"] == "cancelled" + class EventLocationFormatAddress(TestCase): def test_format_address(self):