diff --git a/.env b/.env index 36aa5654325..c03f44d9333 100644 --- a/.env +++ b/.env @@ -3,6 +3,7 @@ DATABASE_PORT=3306 MYSQL_ROOT_PASSWORD=password DATABASE_NAME=specify + # The following are database users with specific roles and privileges. # If the migrator and app user are not defined, the system will use the master user credentials. # See documenation https://discourse.specifysoftware.org/t/new-blank-database-creation-database-user-levels/3023 diff --git a/specifyweb/frontend/js_src/lib/components/QueryBuilder/Line.tsx b/specifyweb/frontend/js_src/lib/components/QueryBuilder/Line.tsx index 792da37d946..1991acdb852 100644 --- a/specifyweb/frontend/js_src/lib/components/QueryBuilder/Line.tsx +++ b/specifyweb/frontend/js_src/lib/components/QueryBuilder/Line.tsx @@ -158,6 +158,16 @@ export function QueryLine({ : (parser.type ?? 'text'); canOpenMap = fieldName === 'latitude1' || fieldName === 'longitude1'; + + // Special case for age field with ageRange filter non-numeric validation + if (fieldType === 'age' && field.filters.some((filter) => filter.type === 'ageRange')) { + parser = { + ...parser, + type: 'number', + step: "any" + }; + } + } else if (isMapped) fieldType = isFormatted && mappingPath.at(-1) === `${schema.referenceSymbol}1` diff --git a/specifyweb/frontend/js_src/lib/utils/parser/definitions.ts b/specifyweb/frontend/js_src/lib/utils/parser/definitions.ts index f612701d5d3..35663cde3cb 100644 --- a/specifyweb/frontend/js_src/lib/utils/parser/definitions.ts +++ b/specifyweb/frontend/js_src/lib/utils/parser/definitions.ts @@ -53,7 +53,7 @@ export const validators: IR<(value: unknown) => string | undefined> = { } as const; export type Parser = Partial<{ - readonly type: 'age' | 'checkbox' | 'date' | 'number' | 'text'; + readonly type: 'checkbox' | 'date' | 'number' | 'text'; readonly minLength: number; readonly maxLength: number; // Number, or a string date in yyyy-mm-dd format