Skip to content

Commit

Permalink
Bugfix that allow clinvar export submission set deletion (#713).
Browse files Browse the repository at this point in the history
Closes: #713
Related-Issue: #713
Projected-Results-Impact: none
  • Loading branch information
holtgrewe committed Sep 28, 2022
1 parent b24e20e commit 9049b64
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Full Change List
- Changing ClinVar link-out to VCV entry instead of coordinates (#693).
- Adding unit test for clinvar Vue app (#692).
- Moving clinvar Vue app (#711).
- Bugfix that allow clinvar export submission set deletion (#713).

------
v1.2.0
Expand Down
1 change: 0 additions & 1 deletion clinvar_export/vueapp/src/api/clinvarExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ async function apiDelete(entity, uuid, appContext) {
`Problem with request: ${response.status} ${response.statusText}`
)
}
return await response.json()
}

/**
Expand Down
12 changes: 9 additions & 3 deletions clinvar_export/vueapp/src/store/modules/clinvarExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,9 @@ export function extractVariantZygosity(smallVariant, individualUuids, state) {

// See whether any individual is annotated as recessive.
let anyRecessive = false
let variantAlleleCount = 0
let variantZygosity = 'not provided'
if (smallVariant) {
let variantAlleleCount = null
let variantZygosity = null
if (smallVariant !== null && smallVariant !== undefined) {
let individual = null
for (const individualUuid of individualUuids) {
const currIndividual = state.individuals[individualUuid]
Expand Down Expand Up @@ -695,6 +695,12 @@ export function extractVariantZygosity(smallVariant, individualUuids, state) {
}
}
}
if (variantAlleleCount === null) {
variantAlleleCount = 0
}
if (variantZygosity === null) {
variantZygosity = 'not provided'
}
return { variantAlleleCount, variantZygosity }
}

Expand Down
2 changes: 1 addition & 1 deletion clinvar_export/vueapp/tests/unit/clinvarExport/api.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ describe('api', () => {
`${appContext.baseUrl}/${entityNoUnder}/`,
expectedJsonDeleteArgs,
])
expect(res).toEqual({ fake: 'result' })
expect(res).toBeUndefined()
})

test('getUserAnnotations', async () => {
Expand Down

0 comments on commit 9049b64

Please sign in to comment.