Skip to content

Commit

Permalink
fix!: Allow null value on externalIds in the Assay model (#647)
Browse files Browse the repository at this point in the history
* fixed null externalIds error on sequencingGroups query

* Bump version: 6.6.1 → 6.6.2

* changed return type of externalIds to be a dict object instead of allowing null values

* cast None values for externalIds to an empty dict
  • Loading branch information
nevoodoo authored Jan 11, 2024
1 parent 674d1f1 commit 8960f3b
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 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 = 6.6.1
current_version = 6.6.2
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>[A-z0-9-]+)
Expand Down
6 changes: 3 additions & 3 deletions api/graphql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ class GraphQLSequencingGroup:
technology: str
platform: str
meta: strawberry.scalars.JSON
external_ids: strawberry.scalars.JSON | None
external_ids: strawberry.scalars.JSON

internal_id: strawberry.Private[int]
sample_id: strawberry.Private[int]
Expand All @@ -498,7 +498,7 @@ def from_internal(internal: SequencingGroupInternal) -> 'GraphQLSequencingGroup'
technology=internal.technology,
platform=internal.platform,
meta=internal.meta,
external_ids=internal.external_ids,
external_ids=internal.external_ids or {},
# internal
internal_id=internal.id,
sample_id=internal.sample_id,
Expand Down Expand Up @@ -575,7 +575,7 @@ def from_internal(internal: AssayInternal) -> 'GraphQLAssay':
id=internal.id,
type=internal.type,
meta=internal.meta,
external_ids=internal.external_ids,
external_ids=internal.external_ids or {},
# internal
sample_id=internal.sample_id,
)
Expand Down
2 changes: 1 addition & 1 deletion api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from api.settings import PROFILE_REQUESTS, SKIP_DATABASE_CONNECTION

# This tag is automatically updated by bump2version
_VERSION = '6.6.1'
_VERSION = '6.6.2'

logger = get_logger()

Expand Down
2 changes: 1 addition & 1 deletion deploy/python/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.6.1
6.6.2
2 changes: 1 addition & 1 deletion models/models/assay.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AssayInternal(SMBase):
sample_id: int
meta: dict[str, Any] | None
type: str
external_ids: dict[str, str] | None = None
external_ids: dict[str, str] | None = {}

def __repr__(self):
return ', '.join(f'{k}={v}' for k, v in vars(self).items())
Expand Down
2 changes: 1 addition & 1 deletion models/models/sequencing_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class SequencingGroupInternal(SMBase):
platform: str | None = None
meta: dict[str, str] | None = None
sample_id: int | None = None
external_ids: dict[str, str] | None = None
external_ids: dict[str, str] | None = {}
archived: bool | None = None

project: int | None = None
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
setup(
name=PKG,
# This tag is automatically updated by bump2version
version='6.6.1',
version='6.6.2',
description='Python API for interacting with the Sample API system',
long_description=readme,
long_description_content_type='text/markdown',
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metamist",
"version": "6.6.1",
"version": "6.6.2",
"private": true,
"dependencies": {
"@apollo/client": "^3.7.3",
Expand Down

0 comments on commit 8960f3b

Please sign in to comment.