Skip to content

Commit

Permalink
update headline mapping assignment article [SDESK-7061]
Browse files Browse the repository at this point in the history
  • Loading branch information
devketanpro committed Nov 8, 2023
1 parent 1efa363 commit 2ce756f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/planning/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def create_item_from_template(doc, extra_fields_to_override=None, translations=N
translated_value = {
entry["field"]: entry["value"] for entry in translations or [] if entry["language"] == doc.get("language")
}

if translated_value.get("name") and "headline" in fields_to_override:
updates["headline"] = translated_value.get("name")

updates.update({key: val for key, val in translated_value.items() if key in fields_to_override})

if len(updates):
Expand Down

0 comments on commit 2ce756f

Please sign in to comment.