bety icon indicating copy to clipboard operation
bety copied to clipboard

Unhelpful error message for bulk upload

Open gsrohde opened this issue 9 years ago • 3 comments

When the trait_covariate_associations table contains references to non-existent trait ids (CORRECTION: variable ids?; this table only refers to the variables table; see UPDATE below), the bulk upload will fail with the message "undefined method `name' for nil:NilClass", which is not very helpful.

The best solution is to ensure this error never occurs by imposing foreign-key constraints.

UPDATE: There already are foreign-key constraints on this table. Not sure what the cause was of the error I was seeing.

gsrohde avatar Aug 10 '16 16:08 gsrohde

Would it be difficult to allow data to be uploaded for traits that don't have an associated covariate? As is, every time I add a new variable, I have to add covariates.

Or would it be easier to implement new pages to create and edit records in this table?

dlebauer avatar Aug 10 '16 16:08 dlebauer

I've been thinking for some time that it should be possible to edit the trait_covariate_associations table via the Web interface. It also would probably not be hard to allow arbitrary variables to be used as trait variables, which would work like this: if a column name corresponds to a variable name and isn't mentioned in the trait_covariate_associations table, it would automatically be considered a trait variable with no associated covariates.

gsrohde avatar Aug 11 '16 15:08 gsrohde

Please start with

if a column name corresponds to a variable name and isn't mentioned in the trait_covariate_associations table, it would automatically be considered a trait variable with no associated covariates.

How hard would it be to add the new and edit pages for trait_covariate_associations?

dlebauer avatar Aug 11 '16 17:08 dlebauer