Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
pretalx becomes unusable "pretalx.schedule.models.schedule.MultipleObjectsReturned: get() returned more than one Schedule -- it returned 2!" #515
Normally I'd expect the pretalx orga interface for schedule adjustments when looking at e.g. https://pretalx.sysmocom.de/orga/event/osmocon2018/schedule/
pretalx displays https://pretalx.sysmocom.de/static/common/img/error_5xx.5baae707387f.svg in the browser and adds the following to the log:
I don't know how I ended up there. Haven't logged into the pretalx instance for several days, and now this.
The database looks like this:
where "2" is the event in question. so basically
which means there are two schedules with no version set so far. I never edited the database, so those two schedules must have been created using the web UI.
The only part of the code that could produce this behaviour as far as I can tell, occurs when the "dirty"/wip schedule is reset to a prior schedule version, and something goes wrong during this method. (The opposite operation was already wrapped in a transaction, seems I missed it for the reversal). I added this and one other safeguard, and I'm reasonably confident that this can't occur again.