diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e207143dbe..b11ea37e01 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 60.8.13 +current_version = 60.8.15 commit = True tag = True tag_name = v{new_version} diff --git a/cg/__init__.py b/cg/__init__.py index 25af54979e..d9f51afb36 100644 --- a/cg/__init__.py +++ b/cg/__init__.py @@ -1,2 +1,2 @@ __title__ = "cg" -__version__ = "60.8.13" +__version__ = "60.8.15" diff --git a/cg/store/models.py b/cg/store/models.py index 2dbdb074a3..df19e4b237 100644 --- a/cg/store/models.py +++ b/cg/store/models.py @@ -1,3 +1,4 @@ +from enum import Enum import re from datetime import datetime from typing import Annotated @@ -66,12 +67,19 @@ class Base(DeclarativeBase): def to_dict(model_instance): + def serialize_value(value): + if isinstance(value, InstrumentedAttribute): + return None + if isinstance(value, Enum): + return value.name + return value + if hasattr(model_instance, "__table__"): return { - column.name: getattr(model_instance, column.name) + column.name: serialize_value(getattr(model_instance, column.name)) for column in model_instance.__table__.columns - if not isinstance(getattr(model_instance, column.name), InstrumentedAttribute) } + return {} customer_user = Table( diff --git a/pyproject.toml b/pyproject.toml index 2029f1b9cd..7b824f4abc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "cg" -version = "60.8.13" +version = "60.8.15" description = "Clinical Genomics command center" authors = ["Clinical Genomics "] readme = "README.md"