Commit fce96608 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

fix changing refs to compounds creating duplicates in other tables

such tables being CompoundTanimoto and DrugbankCompoundTanimoto
WIP on #212
parent 07afa195
Pipeline #29099 passed with stages
in 13 minutes and 34 seconds
......@@ -951,12 +951,10 @@ class Compound(AutoFillableModel):
for cpr in CompoundPKResult.objects.filter(compound=self):
cpr.compound = replacing_compound
for ct in CompoundTanimoto.objects.filter(compound=self):
ct.compound = replacing_compound
for dct in DrugbankCompoundTanimoto.objects.filter(compound=self):
dct.compound = replacing_compound
# remove similarities with current component, in case any had been
# stored
class CompoundTanimoto(models.Model):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment