From 5de30a077449146fe6456ab603c99eaf9f69d5e6 Mon Sep 17 00:00:00 2001 From: youichiro Date: Tue, 8 Mar 2022 18:26:31 +0900 Subject: [PATCH] Specify project when retrieving labels --- backend/data_import/pipeline/writers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/data_import/pipeline/writers.py b/backend/data_import/pipeline/writers.py index a75889ee..cafc9bc7 100644 --- a/backend/data_import/pipeline/writers.py +++ b/backend/data_import/pipeline/writers.py @@ -70,7 +70,7 @@ class Examples: mapping = {} label_types: List[Type[LabelType]] = [CategoryType, SpanType] for model in label_types: - for label in model.objects.all(): + for label in model.objects.filter(project=project): mapping[label.text] = label annotations = list( itertools.chain.from_iterable(