Closed snacktavish closed 4 years ago
It looks like a problem with update to the jsonb column and / or index (because these are all properties that aren't explicitly defined in the model, but come from the jsonb column). I can dig more later.
To be clear - the fix is not to add these to the Tree model, but to determine why they aren't going in / being indexed / being found in the jsonb.
Fixed by PR #49
There is a bug currently where if you update a study, all of the information about the tree in otindex, e.g. @label, or '^ot:branchLengthMode' are replaced by 'null'
and then following an update to the study
It appears that these tree properties are getting loaded correctly when trees are originally loaded in to the otindex database build: https://github.com/OpenTreeOfLife/otindex/blob/master/otindex/scripts/load_nexson.py#L255
but are not getting updated correctly in https://github.com/OpenTreeOfLife/otindex/blob/master/otindex/add_update_studies.py#L84
potentially due to those properties not being included in the Tree model defined here: https://github.com/OpenTreeOfLife/otindex/blob/master/otindex/models.py#L89