The Grist API requires all filter values to be arrays. This change adds automatic normalization of filter values in get_records, wrapping single values in lists before sending to the API. This fixes 400 errors when filtering on Ref columns with single integer IDs. Changes: - Add filters.py module with normalize_filter function - Update get_records to normalize filters before API call - Add Orders table with Ref column to mock Grist server - Add filter validation to mock server (rejects non-array values) - Fix shell script shebangs for portability (#!/usr/bin/env bash)
8 lines
319 B
Bash
Executable File
8 lines
319 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# scripts/get-test-instance-id.sh
|
|
# Generate a unique instance ID from git branch for parallel test isolation
|
|
|
|
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")
|
|
# Sanitize: replace non-alphanumeric with dash, limit length
|
|
echo "$BRANCH" | sed 's/[^a-zA-Z0-9]/-/g' | cut -c1-20
|