Skip to content

Commit e8f325a

Browse files
author
Dmytro Trotsko
committed
FIxed field mapping
1 parent 652fdae commit e8f325a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/indicators/resources.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,13 @@ def process_indicator_set(row) -> None:
6767
if row["Indicator Set"]:
6868
indicator_set_name = row["Indicator Set"].strip()
6969
try:
70-
indicator_set_obj = IndicatorSet.objects.get(
71-
name=indicator_set_name
72-
)
70+
indicator_set_obj = IndicatorSet.objects.get(name=indicator_set_name)
7371
indicator_set_id = indicator_set_obj.id
7472
except IndicatorSet.DoesNotExist:
7573
logger.warning(f"Indicator Set '{indicator_set_name}' not found.")
7674
row["Indicator Set"] = indicator_set_id
7775

7876

79-
8077
def process_indicator_type(row) -> None:
8178
if row["Indicator Type"]:
8279
indicator_type = row["Indicator Type"]
@@ -507,7 +504,7 @@ class OtherEndpointIndicatorResource(ModelResource):
507504
pathogens = Field(
508505
attribute="pathogens",
509506
column_name="Pathogen/\nDisease Area",
510-
widget=ManyToManyWidget(Pathogen, field="name", separator=","),
507+
widget=ManyToManyWidget(Pathogen),
511508
)
512509
indicator_type = Field(
513510
attribute="indicator_type",

0 commit comments

Comments
 (0)