Adding offline boolean parameter to Event model class
Compare changes
Files
6
gracedb/migrations/0021_event_offline.py
0 → 100644
+ 19
− 0
Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 1 April 2025 starting at approximately 9am PDT. It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk.
Adds 'offline' boolean to Event model (gracedb/models.py, gracedb/migrations/0021_event_offline.py), along with necessary changes for handling it in event submissions (gracedb/view_logic.py), processing it through a Form (gracedb/forms.py), exposing it via the API (gracedb/view_utils.py), and denoting it in the web interface with a red text header (templates/gracedb/event_detail.html) reading 'OFFLINE EVENT'.
I've tested creating events with both values of this parameter, retrieving them through the API, and checked the content of LVAlert messages. I've also successfully run the client code unit tests.
An updated version of gracedb-client is needed to take advantage of this feature, but this should be backwards-compatible. The corresponding merge request is here: https://git.ligo.org/lscsoft/gracedb-client/merge_requests/16.