Skip to content

Commit

Permalink
fix: remove unwanted use of global variable CONFIG
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Sep 26, 2023
1 parent 25499de commit 2d814ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
analyzer,
)

from app.config import CONFIG, Config, FieldConfig, FieldType, TaxonomySourceConfig
from app.config import Config, FieldConfig, FieldType, TaxonomySourceConfig
from app.taxonomy import get_taxonomy
from app.types import JSONType
from app.utils import load_class_object_from_string
Expand Down Expand Up @@ -233,7 +233,7 @@ def from_dict(self, d: JSONType) -> JSONType | None:

def generate_mapping_object(config: Config) -> Mapping:
mapping = Mapping()
supported_langs = CONFIG.get_supported_langs()
supported_langs = config.get_supported_langs()
for field in config.fields:
mapping.field(
field.name, generate_dsl_field(field, supported_langs=supported_langs)
Expand Down

0 comments on commit 2d814ea

Please sign in to comment.