Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CLIN-3284 fix erreur 500 #540

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
25 changes: 18 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,29 @@ 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)) {
if (!Array.isArray((c as IValueFilter).content)) {
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
Loading