Is there an easy way to dump a list of event IDs that are under a specific category ID. We’re standing up an internal Indico instance and would like to transfer a handful of categories and all events under those categories to the new instance.
I found how to export/import Events using indico shell and would like to use this but I need a list of event IDs first.
Event.query.filter(Event.category_chain_overlaps()).all() would give you all events that are somewhere within category 2 (including nested subcategories). If you just need the IDs you can use something like [e.id for e in ...]. around the results from that query.