Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Narcisi committed Nov 2, 2023
1 parent f9102ca commit e052d9d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pypnnomenclature/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,12 @@ class TNomenclatures(db.Model):
@staticmethod
def get_default_nomenclature(mnemonique, id_organism=0):
q = select(
[
func.ref_nomenclatures.get_default_nomenclature_value(
mnemonique, id_organism
).label("default")
]
)
result = db.session.execute(q)
return result.fetchone()["default"]
return result.fetchone()._mapping["default"]


class TNomenclatureTaxonomy(TNomenclatures):
Expand Down Expand Up @@ -140,6 +138,7 @@ class BibNomenclaturesTypeTaxo(BibNomenclaturesTypes):
primaryjoin="and_(TNomenclatureTaxonomy.id_type == BibNomenclaturesTypes.id_type, TNomenclatureTaxonomy.active == True)",
lazy="joined",
order_by="TNomenclatureTaxonomy.hierarchy",
overlaps="nomenclature_type,nomenclatures"
)


Expand Down

0 comments on commit e052d9d

Please sign in to comment.