bety
bety copied to clipboard
In Bulk Upload Wizard, give better error message when foreign-key variables are missing.
The BETYdb Rails code for the Bulk Upload Wizard relies on compliance with the foreign-key constraints on the trait_covariate_associations
table that ensure that the referred-to variables exist. Unfortunately, the load.bety.sh
database synchronization script bypasses these constraints when importing data from other databases, possibly resulting in a state of non-compliance.
If the trait_covariate_asssociations
table refers to variables that are missing, the Bulk Upload Wizard will fail with the unhelpful error message undefined method `name' for nil:NilClass
. Users should instead be alerted that they may need to import the referred-to variables.