- assigned_to: mjdominus --> youjun
Study_id 22 and 23 have treeblock records that lack phylotree records. This causes errors in the unit tests. But additionally, we cannot delete these submission. (i.e. http://treebasedb-dev.nescent.org:8180/treebase-web/user/deleteStudy.html?submissionid=22 throws and error). Either the orphans should be deleted separately (e.g. with a SQL statement), or the deletion feature should be make capable for deleting them. The orphaned records can be found like so:
SELECT tb.treeblock_id
FROM study st JOIN submission sub ON (st.study_id = sub.study_id)
JOIN sub_treeblock stb ON (sub.submission_id = stb.submission_id)
JOIN treeblock tb ON (stb.treeblock_id = tb.treeblock_id)
LEFT JOIN phylotree pt ON (pt.treeblock_id = tb.treeblock_id)
WHERE pt.phylotree_id IS NULL
AND st.study_id = 22