Cannot create new version
Observed by Vignesh: When attempting to create a new version of a manuscript, the "Create new version" button would become disabled but no new version would be created.
On investigation this bug was caused by the recent search implementation, which introduced extra columns to the manuscript table. One column, search_tsvector
, was never intended to be read by the server, but was only intended for use by Postgres to facilitate search. For that reason, that column wasn't added to the JSON schema for the Manuscript model. However, when querying manuscripts, this column was being retrieved anyway, so that when a retrieved record was used to write back to the DB (in this case to copy to a new manuscript record), there was an extra searchTsvector
property present not allowed by the schema.