Commit 9566e42e authored by Fabien  MAREUIL's avatar Fabien MAREUIL
Browse files

bug fix: autofill method does not exist in previous DrugBankCompound class

parent a834b1ae
Pipeline #46775 failed with stages
in 23 minutes and 32 seconds
# Generated by Django 2.2.1 on 2020-04-28 17:17
from django.db import migrations, models
from ippidb.models import DrugBankCompound as DrugBankCompound__latest
import django.db.models.deletion
def run_generate_drugbank_inchikey(apps, schema_editor):
DrugBankCompound = apps.get_model("ippidb", "DrugBankCompound")
for drugbank_compound in DrugBankCompound.objects.all():
drugbank_compound.save(autofill=True)
# get_model does not conserve autofill method, we force to use
# the latest version of autofill method but be carefull with
# the futur autofill code evolution, see commit '4555c122'
((DrugBankCompound__latest)(drugbank_compound)).autofill()
drugbank_compound.save()
def set_compound_drugbank_links(apps, schema_editor):
Compound = apps.get_model("ippidb", "Compound")
......
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