Skip to content

Add exclude_attending to event search query#9164

Merged
nabramow merged 3 commits into
developfrom
na/backend/disc-events-exclude-attending
Jun 28, 2026
Merged

Add exclude_attending to event search query#9164
nabramow merged 3 commits into
developfrom
na/backend/disc-events-exclude-attending

Conversation

@nabramow

Copy link
Copy Markdown
Member

I didn't realize when I did the other that this is a separate query (since this one supports more searching params). Adding it here too.

Testing

Explain how you tested this PR and give clear steps so the reviewer can replicate.

Backend checklist

  • Added tests for any new code or added a regression test if fixing a bug
  • Run the backend locally and it works
  • Added migrations if there are any database changes, rebased onto develop if necessary for linear migration history

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

@nabramow
nabramow requested a review from aapeliv as a code owner June 22, 2026 15:34
Comment on lines +790 to +793
if request.attending and request.exclude_attending:
context.abort_with_error_code(
grpc.StatusCode.INVALID_ARGUMENT, "cannot_combine_attending_and_exclude_attending"
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other one had include_attending which was a bit different but I think it still doesn't make sense to allow both at the same time?

@CouchersBot

CouchersBot commented Jun 22, 2026

Copy link
Copy Markdown
Member

Mobile

Install the Dev Tool (iOS via TestFlight, iOS Simulator, or Android .apk) here.

Scan the QR with your phone camera, or tap Open in Dev Tool on the device, to open this branch in the installed Dev Tool dev client.

    iOS         Android    
    QR to open the iOS build         QR to open the Android build    
    Open in Dev Tool         Open in Dev Tool    
Deep links

iOS

couchers-devtool://expo-development-client/?url=https%3A%2F%2F588527d4--ota.preview.couchershq.org%2Fios%2Fmanifest

Android

couchers-devtool://expo-development-client/?url=https%3A%2F%2F588527d4--ota.preview.couchershq.org%2Fandroid%2Fmanifest

Web (Vercel)

View the Vercel web preview for this branch.

Backend

Schema Schema diff Sample emails

Other

Protos Backend coverage Web coverage

Comment on lines +875 to +877
if where_:
statement = statement.where(or_(*where_))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an empty OR means "no inclusion filter" (return everything), not "return nothing"?

@nabramow
nabramow merged commit faf1fca into develop Jun 28, 2026
4 checks passed
@nabramow
nabramow deleted the na/backend/disc-events-exclude-attending branch June 28, 2026 13:52
@github-actions github-actions Bot added the release notes: pending Add to stuff that should be included in release notes label Jun 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This PR should be included in the release notes.

Suggested release note:

Added an option to exclude events you're already attending or organizing from event search results
🤖 Bot Debug Information

Model: couchers.openai.gpt-5.4
Decision: include
Reasoning: This adds a new event search filter that can noticeably improve how users browse events, especially by hiding events they are already attending or organizing. It is a user-facing search capability rather than an internal-only change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: pending Add to stuff that should be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants