Skip to content

Commit

Permalink
add NTBKilde attribute in ninjs output [SDNTB-861]
Browse files Browse the repository at this point in the history
  • Loading branch information
devketanpro committed Dec 26, 2023
1 parent b23c60a commit efb58a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/ntb/publish/ntb_ninjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def _transform_to_ninjs(self, article, subscriber, recursive=True):
if ninjs.get("guid"):
ninjs.setdefault("uri", ninjs["guid"])

if ninjs.get("extra", {}).get("ntb_pub_name"):
ninjs["NTBKilde"] = ninjs["extra"]["ntb_pub_name"]

# removed items which mapped according to Ninjs v2 properties
ninjs_properties = [
"headlines",
Expand Down Expand Up @@ -116,6 +119,7 @@ def _transform_to_ninjs(self, article, subscriber, recursive=True):
"rightsinfo",
"service",
"infosources",
"NTBKilde",
]

for key in list(ninjs.keys()):
Expand Down

0 comments on commit efb58a3

Please sign in to comment.