Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/uat' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Oct 16, 2023
2 parents 6ecfbae + 062919c commit 5dab4bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions server/cp/output/formatter/jimi.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,14 +565,17 @@ def _format_refs(self, content, item):
refs = set(
[
slug(self._get_original_item(ref))
for ref in superdesk.get_resource_service("news").get(
req=None,
lookup={
"refs.guid": item["guid"],
"pubstatus": "usable",
"state": "published",
for ref in superdesk.get_resource_service("news").search({
"query": {
"bool": {
"must": [
{"term": {"refs.guid": item["guid"]}},
{"term": {"pubstatus": "usable"}},
{"terms": {"state": ["published", "scheduled"]}},
],
},
},
)
})
]
)

Expand Down
4 changes: 2 additions & 2 deletions server/tests/output/formatter/jimi_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def test_ap_update_keeps_newscomip(self):
self.assertEqual("00000001", item.find("NewsCompID").text)

def test_picture_container_ids(self):
resources["news"].service.get.side_effect = [
resources["news"].service.search.side_effect = [
[
{"guid": "usable", "pubstatus": "usable", "type": "text"},
{
Expand All @@ -507,7 +507,7 @@ def test_picture_container_ids(self):
}
)

resources["news"].service.get.side_effect = None
resources["news"].service.search.side_effect = None

self.assertEqual("{}, usable".format(32 * "a"), item.find("ContainerIDs").text)

Expand Down

0 comments on commit 5dab4bd

Please sign in to comment.