@guillermo-carrasco This is a quick fix that will solve the problem nicely and I'm merging it. 
I'm going to be a bit picky though: in the long run I think it is better to leave this (generic) method as it was and instead modify the code that creates the 'illumina' entry, i.e. the methods "_collect_pre_casava_qc" and, more importantly, "_collect_casava_qc". This of course requires that the db object is fetched inside those methods rather than a fresh object is created. Could be it turns out not to be feasible though..