Skip to content
Open
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
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions specifyweb/frontend/js_src/lib/components/QueryBuilder/Line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/frontend/js_src/lib/utils/parser/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down