Skip to content

Commit

Permalink
fixed unpopulating description from pep 2
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Sep 24, 2024
1 parent 041f368 commit acc1343
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bbconf/models/bed_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class BedFiles(BaseModel):

class BedClassification(BaseModel):
name: Optional[str] = None
description: Optional[str] = None
genome_alias: str = None
genome_digest: Union[str, None] = None
bed_type: str = Field(
Expand Down Expand Up @@ -110,6 +109,7 @@ class StandardMeta(BaseModel):
species_id: str = ""
genotype: str = Field("", description="Genotype of the sample")
phenotype: str = Field("", description="Phenotype of the sample")
description: Union[str, None] = ""

cell_type: str = Field(
"",
Expand Down
5 changes: 4 additions & 1 deletion bbconf/modules/bedfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ def add(
new_bed = Bed(
id=identifier,
**classification.model_dump(),
description=bed_metadata.description,
license_id=license_id,
indexed=upload_qdrant,
pephub=upload_pephub,
Expand Down Expand Up @@ -539,7 +540,9 @@ def add(
session.add(new_plot)

new_bedstat = BedStats(**stats.model_dump(), id=identifier)
new_metadata = BedMetadata(**bed_metadata.model_dump(), id=identifier)
new_metadata = BedMetadata(
**bed_metadata.model_dump(exclude={"description"}), id=identifier
)

session.add(new_bedstat)
session.add(new_metadata)
Expand Down

0 comments on commit acc1343

Please sign in to comment.