Searching for abstracts in a specific track with indico shell



Sorry if this is very obvious.

If I want to find, with indico shell, all abstracts that were submitted to a particular track, how do I do that?

I thought it should be something like

Abstract.query.filter(Abstract.submitted_for_tracks == 35).all()

but then realized that it doesn’t work, since the method returns tracks not track IDs, also there are some abstracts with multiple tracks.



Dear Ying,

event = Event.get_one(<event_id>)
# get all abstracts submitted for a single track
Abstract.query.with_parent(event).filter(Abstract.submitted_for_tracks.any( == <track_id>)).all()

# get all abstracts submitted to multiple tracks
Abstract.query.with_parent(event).filter(Abstract.submitted_for_tracks.any([<list of track ids>]))).all()


Great, thanks so much!