Skip to content

Commit

Permalink
Merge branch 'production' into dependabot/pip/django-4.2.18
Browse files Browse the repository at this point in the history
  • Loading branch information
acwhite211 authored Jan 24, 2025
2 parents 5c473c3 + 7a67729 commit e510023
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN apt-get update \
python3.8-venv \
python3.8-distutils \
python3.8-dev \
default-libmysqlclient-dev \
libmariadbclient-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ export function QueryComboBox({
: fieldName === 'taxonTreeDefId'
? {
field: 'definition',
queryBuilderFieldPath: [
'definition',
'id',
],
isRelationship: true,
operation: 'in',
isNot: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ import type { QueryFieldFilter } from '../QueryBuilder/FieldFilter';
import { queryFieldFilters } from '../QueryBuilder/FieldFilter';
import { QueryFieldSpec } from '../QueryBuilder/fieldSpec';
import { QueryBuilder } from '../QueryBuilder/Wrapped';
import type { MappingPath } from '../WbPlanView/Mapper';
import { queryCbxExtendedSearch } from './helpers';
import { SelectRecordSets } from './SelectRecordSet';

const resourceLimit = 100;

export type QueryComboBoxFilter<SCHEMA extends AnySchema> = {
readonly field: string & (keyof CommonFields | keyof SCHEMA['fields']);
readonly queryBuilderFieldPath?: MappingPath;
readonly isRelationship: boolean;
readonly isNot: boolean;
readonly operation: QueryFieldFilter & ('between' | 'in' | 'less');
Expand Down Expand Up @@ -156,7 +158,6 @@ function testFilter<SCHEMA extends AnySchema>(
? // Cast numbers to strings
values.some((value) => {
const fieldValue = resource.get(field);

return isRelationship
? value == strictIdFromUrl(fieldValue!).toString()
: value == fieldValue;
Expand Down Expand Up @@ -395,8 +396,8 @@ const toQueryFields = <SCHEMA extends AnySchema>(
table: SpecifyTable<SCHEMA>,
filters: RA<QueryComboBoxFilter<SCHEMA>>
): RA<SpecifyResource<SpQueryField>> =>
filters.map(({ field, operation, isNot, value }) =>
QueryFieldSpec.fromPath(table.name, [field])
filters.map(({ field, queryBuilderFieldPath, operation, isNot, value }) =>
QueryFieldSpec.fromPath(table.name, queryBuilderFieldPath ?? [field])
.toSpQueryField()
.set('operStart', queryFieldFilters[operation].id)
.set('isNot', isNot)
Expand Down

0 comments on commit e510023

Please sign in to comment.