Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/2.7' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Jul 2, 2024
2 parents 23407e3 + 307aefa commit 102b08d
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 87 deletions.
119 changes: 34 additions & 85 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion server/planning/commands/export_to_newsroom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion server/planning/events/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 21 additions & 0 deletions server/planning/events/events_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 102b08d

Please sign in to comment.