bety icon indicating copy to clipboard operation
bety copied to clipboard

In Bulk Upload Wizard, give better error message when foreign-key variables are missing.

Open gsrohde opened this issue 6 years ago • 0 comments

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.

gsrohde avatar Jun 22 '18 20:06 gsrohde