Unable to create a ZIM
kelson42 opened this issue · comments
Kelson commented
Travis Briggs commented
I'm not sure exactly what is going on here, but I imagine it has something to do with old selections not being properly migrated with the ever-changing database schema. I see this in the database, which looks like the ZIM was properly created?
b_id | s_updated_at | s_version | z_id | z_selection_id | z_status | z_task_id | z_requested_at | z_updated_at | z_long_description | z_description |
---|---|---|---|---|---|---|---|---|---|---|
493cc3c1-b4fd-4bbb-bc6f-57758b73438f | 20230709153814 | 6 | 22 | 2a5be533-007c-47ef-a854-f90f7190b5d2 | FILE_READY | 6eb8ae16-cd42-4558-89df-dd2a04b76110 | 20230709153835 | 20230709154020 | NULL | Le bardo |
Travis Briggs commented
Nevermind, I figured it out. Old Builders are returning null
for their status, but the Zim File page expects it to be NOT_REQUESTED
. Should be an easy fix, to default to NOT_REQUESTED
instead of null
.
Travis Briggs commented
Okay rather than patch the code I issued an update to the database to fix the data. This should be resolved.
Travis Briggs commented
Just for record keeping, this is the SQL I ran:
> INSERT INTO zim_files (z_selection_id) SELECT s.s_id FROM selections s LEFT JOIN zim_files z ON z.z_selection_id = s.s_id WHERE z.z_id IS NULL;
Query OK, 59 rows affected (0.004 sec)