Skip to content

Commit

Permalink
Minor fix to TaxonomyEntry type & initial data loading (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Wright authored Jun 12, 2023
1 parent a56d999 commit b97de0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/core/ingestion/metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Mapping, Sequence, Union, Optional
from typing import Any, Mapping, Sequence, Union

from pydantic.dataclasses import dataclass
from pydantic.config import ConfigDict, Extra
Expand All @@ -13,7 +13,7 @@ class TaxonomyEntry:

allow_blanks: bool
allowed_values: Sequence[str]
allow_any: Optional[bool] = False
allow_any: bool = False


Taxonomy = Mapping[str, TaxonomyEntry]
Expand Down
2 changes: 2 additions & 0 deletions app/data_migrations/populate_taxonomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def populate_org_taxonomy(
)
db.add(org)
db.flush()
db.commit()

metadata_org = (
db.query(MetadataOrganisation)
Expand All @@ -46,6 +47,7 @@ def populate_org_taxonomy(
)
)
db.flush()
db.commit()


def populate_taxonomy(db: Session) -> None:
Expand Down

0 comments on commit b97de0b

Please sign in to comment.