From 1e44547febe35c37ca906ef158f8003ca015b6a7 Mon Sep 17 00:00:00 2001 From: devketanpro Date: Mon, 9 Oct 2023 11:59:44 +0530 Subject: [PATCH] fix black --- server/planning/archive.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/planning/archive.py b/server/planning/archive.py index a430757c5..3e9bacd23 100644 --- a/server/planning/archive.py +++ b/server/planning/archive.py @@ -24,7 +24,7 @@ ] -def create_item_from_template(doc, extra_fields_to_override=None, translations = None): +def create_item_from_template(doc, extra_fields_to_override=None, translations=None): fields_to_override = deepcopy(TEMPLATE_FIELDS_TO_OVERRIDE) if extra_fields_to_override is not None: fields_to_override.extend(extra_fields_to_override) @@ -38,8 +38,10 @@ def create_item_from_template(doc, extra_fields_to_override=None, translations = # and apply them if any found updates = {key: val for key, val in doc.items() if key in fields_to_override} - #override translated values if any - translated_value = {entry["field"]: entry["value"] for entry in translations or [] if entry["language"] == doc.get("language")} + # override translated values if any + translated_value = { + entry["field"]: entry["value"] for entry in translations or [] if entry["language"] == doc.get("language") + } updates = {key: val for key, val in translated_value.items() if key in fields_to_override} if len(updates):