From 1c9a553a2675f5b97b908eea2fca50ce7ce2bb5f Mon Sep 17 00:00:00 2001 From: Alex Garel Date: Fri, 8 Nov 2024 19:06:28 +0100 Subject: [PATCH] fix: small fixes to pass quality --- backend/editor/controllers/node_controller.py | 3 ++- backend/editor/entries.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/editor/controllers/node_controller.py b/backend/editor/controllers/node_controller.py index 2015f504..c639bac5 100644 --- a/backend/editor/controllers/node_controller.py +++ b/backend/editor/controllers/node_controller.py @@ -1,3 +1,4 @@ +import datetime import logging from openfoodfacts_taxonomy_parser import utils as parser_utils @@ -38,7 +39,7 @@ async def create_entry_node( "id": language_code + ":" + normalized_name, f"tags_{language_code}": [name], f"tags_ids_{language_code}": [normalized_name], - f"modified": datetime.datetime.now().timestamp(), + "modified": datetime.datetime.now().timestamp(), } params = {"entry_node": entry_node_data} diff --git a/backend/editor/entries.py b/backend/editor/entries.py index 3b25756f..4c84fe91 100644 --- a/backend/editor/entries.py +++ b/backend/editor/entries.py @@ -3,6 +3,7 @@ """ import asyncio +import datetime import logging import shutil import tempfile @@ -32,7 +33,7 @@ TransactionCtx, get_current_transaction, ) -from .models.node_models import EntryNode, EntryNodeCreate +from .models.node_models import EntryNode, EntryNodeCreate, NodeType from .models.project_models import ProjectCreate, ProjectEdit, ProjectStatus from .settings import EXTERNAL_TAXONOMIES