Skip to content

Commit

Permalink
Merge branch 'master' into add-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrOertlin authored May 27, 2024
2 parents de4cd4f + 64c2e2e commit ffa8d25
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 60.8.13
current_version = 60.8.15
commit = True
tag = True
tag_name = v{new_version}
Expand Down
2 changes: 1 addition & 1 deletion cg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__title__ = "cg"
__version__ = "60.8.13"
__version__ = "60.8.15"
12 changes: 10 additions & 2 deletions cg/store/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from enum import Enum
import re
from datetime import datetime
from typing import Annotated
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit ffa8d25

Please sign in to comment.