Treat stamped questionnaire as empty in copy-from-spouse target guard #71
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-copy-from-spouse-empty-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Copy from Spouse failed with:
The target was the boilerplate
.lilythat gets created when you create a new client — which you have to do before the copy-from-spouse action is even available.Cause
copy_from_spouse_lilyguards the target viais_empty_project, which still requiredquestionnaire_id.is_none(). Since #63, every freshly-created client is stamped with aquestionnaire_id/questionnaire_versionat creation, so that boilerplate.lilywas treated as non-empty and rejected.This is the backend twin of the frontend
isFreshWorkspaceregression fixed in #70.Fix
Drop the
questionnaire_idcondition fromis_empty_project. Emptiness is now determined solely by actual client data — variables, documents, contacts, bindings, questionnaire notes, and required documents. Added a regression test covering a fresh client stamped with only a questionnaire id/version.Verification
make test(96 passed) andmake lintboth pass.