diff --git a/.github/workflows/.test-integration.yml.swp b/.github/workflows/.test-integration.yml.swp deleted file mode 100644 index f9970cd..0000000 Binary files a/.github/workflows/.test-integration.yml.swp and /dev/null differ diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index d782c15..40248c7 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -135,7 +135,7 @@ jobs: echo "Running tests with DATABASE_URL: $DATABASE_URL" echo "Environment check:" env | grep -E "(DATABASE_URL|JWT_SECRET|API_URL)" | sort - cargo test --test '*' -- --test-threads=1 + cargo test --test '*' --features test-utils -- --test-threads=1 env: DATABASE_URL: ${{ env.DATABASE_URL }} TEST_DATABASE_URL: ${{ env.DATABASE_URL }} diff --git a/src/routes/documents.rs b/src/routes/documents.rs index 9c9cd20..14917b8 100644 --- a/src/routes/documents.rs +++ b/src/routes/documents.rs @@ -669,7 +669,7 @@ async fn get_failed_ocr_documents( GROUP BY document_id ) q ON d.id = q.document_id WHERE d.ocr_status = 'failed' - AND ($1 = $1 OR d.user_id = $1) -- Admin can see all, users see only their own + AND ($1::uuid IS NULL OR d.user_id = $1) -- Admin can see all, users see only their own ORDER BY d.updated_at DESC LIMIT $2 OFFSET $3 "#