Skip to content

Commit

Permalink
ninjs_newsroom: No option extra.publish_ingest_id_as_guid
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLark86 committed Oct 30, 2023
1 parent 31cbde0 commit 5449820
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superdesk/publish/formatters/ninjs_newsroom_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ def _format_products(self, article):
def _transform_to_ninjs(self, article, subscriber, recursive=True):
ninjs = super()._transform_to_ninjs(article, subscriber, recursive)

if article.get("ingest_id") and article.get("auto_publish"):
if article.get("ingest_id") and (
article.get("auto_publish") or (article.get("extra") or {}).get("publish_ingest_id_as_guid")
):
ninjs["guid"] = article.get("ingest_id")
if article.get("ingest_version"):
ninjs["version"] = article["ingest_version"]
Expand Down

0 comments on commit 5449820

Please sign in to comment.