mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
The board import stored spentTime: card.spentTime || null, and MongoDB and FerretDB refuse the $inc that logs time on a null, so /cards/updateAsync failed on every such card. The importers now store a Number. The Cards and Boards before.update hooks turn an $inc of a stored non-number into the $set of the sum (models/lib/spentTime.js) - not an update pipeline, which FerretDB v1, Minimongo and allow/deny refuse. The startup step spenttime-null-repair resets the stored nulls to 0. Checked against FerretDB: the bare $inc and the pipeline are both refused there, the hook's $set and the repair step work. Thanks to Raymond-Voogt and xet7 ! Fixes #6940.