From a4c9b9d55ac695833ec4a7d40d623d06474e5f88 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Mon, 20 Dec 2021 14:54:30 +0900 Subject: [PATCH] Fix builder's factory --- backend/api/views/upload/factories.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/api/views/upload/factories.py b/backend/api/views/upload/factories.py index 7177a14f..1050e67a 100644 --- a/backend/api/views/upload/factories.py +++ b/backend/api/views/upload/factories.py @@ -56,13 +56,13 @@ def create_cleaner(project): def create_bulder(project, **kwargs): data_column = builders.DataColumn( - name=kwargs.get('column_data', readers.DEFAULT_TEXT_COLUMN), + name=kwargs.get('column_data') or readers.DEFAULT_TEXT_COLUMN, value_class=get_data_class(project.project_type) ) # Todo: If project is EntityClassification, # column names are fixed: entities, cats label_column = builders.LabelColumn( - name=kwargs.get('column_label', readers.DEFAULT_LABEL_COLUMN), + name=kwargs.get('column_label') or readers.DEFAULT_LABEL_COLUMN, value_class=get_label_class(project.project_type) ) builder = builders.ColumnBuilder(