Skip to content

Commit

Permalink
fix: CLIN-3284 fix erreur 500
Browse files Browse the repository at this point in the history
  • Loading branch information
claudia1296 committed Oct 16, 2024
1 parent 4335ba8 commit 375e2d9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
3 changes: 3 additions & 0 deletions packages/ui/Release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 10.10.8 2024-10-16
- fix: CLIN-3284 fix error 500 query

### 10.10.7 2024-10-11
- feat: CLIN-2989 Filter flag dropdown and querybuilder not includes tablefitler

Expand Down
4 changes: 2 additions & 2 deletions packages/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ferlab/ui",
"version": "10.10.7",
"version": "10.10.8",
"description": "Core components for scientific research data portals",
"publishConfig": {
"access": "public"
Expand Down
27 changes: 20 additions & 7 deletions packages/ui/src/components/QueryBuilder/utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,31 @@ export const removeIgnoreFieldFromQueryContent = (
): ISyntheticSqon => {
const queryToRemove = query.content.filter((c) => {
let toKeep = false;
if (((c as IValueFilter).content as unknown as IValueContent[]).length !== 0) {
if (!filterQueryToIgnore?.includes(((c as IValueFilter).content as IValueContent).field)) {
console.log('filter query', query);
if (!Array.isArray((c as IValueFilter).content)) {
console.log('filter c', c);
if ((c as IValueFilter).content) {
if (!filterQueryToIgnore?.includes(((c as IValueFilter).content as IValueContent).field)) {
toKeep = true;
}
} else {
toKeep = true;
}
if (Array.isArray((c as IValueFilter).content)) {
const { field } = ((c as IValueFilter).content as unknown as IValueFilter[])[0]
.content as IValueContent;
if (filterQueryToIgnore?.includes(field)) {
toKeep = false;
} else {
if (((c as IValueFilter).content as unknown as IValueContent[]).length !== 0) {
if (!filterQueryToIgnore?.includes(((c as IValueFilter).content as IValueContent).field)) {
toKeep = true;
}
if (Array.isArray((c as IValueFilter).content)) {
const { field } = ((c as IValueFilter).content as unknown as IValueFilter[])[0]
.content as IValueContent;
if (filterQueryToIgnore?.includes(field)) {
toKeep = false;
}
}
}
}

return toKeep;
});
return {
Expand Down

0 comments on commit 375e2d9

Please sign in to comment.