Skip to content

Commit

Permalink
Fix codacy and ALL filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShifaSZ committed Jul 20, 2023
1 parent 71e905d commit 424e66b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion seqr/views/apis/summary_data_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from matchmaker.matchmaker_utils import get_mme_gene_phenotype_ids_for_submissions, parse_mme_features, \
get_mme_metrics, get_hpo_terms_by_id
from matchmaker.models import MatchmakerSubmission
from seqr.models import Family, Individual, VariantTag, SavedVariant, FamilyAnalysedBy
from seqr.models import Family, Individual, SavedVariant, FamilyAnalysedBy
from seqr.views.utils.file_utils import load_uploaded_file
from seqr.utils.gene_utils import get_genes
from seqr.views.utils.json_utils import create_json_response
Expand Down
6 changes: 5 additions & 1 deletion ui/shared/components/panel/variants/SavedVariants.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ class SavedVariants extends React.PureComponent {

navigateToTag = (e, data) => {
const { history, getUpdateTagUrl, match } = this.props
history.push(getUpdateTagUrl(data.value, match))
const { value } = data
if (value.length === 0) {
value.push(ALL_FILTER)
}
history.push(getUpdateTagUrl(value.length > 1 ? value.filter(tag => tag !== ALL_FILTER) : value, match))
}

showAllFilters = () => {
Expand Down

0 comments on commit 424e66b

Please sign in to comment.