Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
devketanpro committed Nov 8, 2023
1 parent 07797ec commit 7a0b689
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions server/planning/planning/planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,12 +736,15 @@ def _create_update_assignment(
is_coverage_draft = coverage_status == WORKFLOW_STATE.DRAFT

translations = planning.get("translations")
translated_value = {}
if translations is not None:
translated_value = {
entry["field"]: entry["value"]
for entry in translations or []
if entry["language"] == doc.get("planning", {}).get("language")
}
translated_value.update(
{
entry["field"]: entry["value"]
for entry in translations or []
if entry["language"] == doc.get("planning", {}).get("language")
}
)
doc["planning"].update(
{
key: val
Expand Down

0 comments on commit 7a0b689

Please sign in to comment.