Fix Line Profiler query (#2338)

# Pull Request Checklist

## Description
- [ ] **Description of PR**: Clear and concise description of what this
PR accomplishes
- [ ] **Breaking Changes**: Document any breaking changes (if
applicable)
- [ ] **Related Issues**: Link to any related issues or tickets

## Testing
- [ ] **Test cases Attached**: All relevant test cases have been
added/updated
- [ ] **Manual Testing**: Manual testing completed for the changes

## Monitoring & Debugging
- [ ] **Logging in place**: Appropriate logging has been added for
debugging user issues
- [ ] **Sentry will be able to catch errors**: Error handling ensures
Sentry can capture and report errors
- [ ] **Avoid Dev based/Prisma logging**: No development-only or
Prisma-specific logging in production code

## Configuration
- [ ] **Env variables newly added**: Any new environment variables are
documented in .env.example file or mentioned in description
---

## Additional Notes
<!-- Add any additional context, screenshots, or notes for reviewers
here -->
This commit is contained in:
HeshamHM28 2026-01-30 16:04:29 -08:00 committed by GitHub
parent 289827e5cb
commit 795c157d12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,7 +154,6 @@ export async function getOptimizationEventById({
const repoIds = (await getRepositoriesForAccountCached(payload)).repoIds
const where: any = {
trace_id,
is_staging: true,
...buildOptimizationOrCondition(payload, repoIds),
}
const event = await prisma.optimization_events.findFirst({