diff --git a/ippisite/ippidb/management/commands/import_v1_data.py b/ippisite/ippidb/management/commands/import_v1_data.py index 8820aca4aba57dd59f10d82de0826fd08ab9c9b0..5d6592cc642cec1bcbbe1e0e411930ac3fec7eed 100644 --- a/ippisite/ippidb/management/commands/import_v1_data.py +++ b/ippisite/ippidb/management/commands/import_v1_data.py @@ -1,7 +1,7 @@ from django.core.management import BaseCommand, CommandError import mysql.connector -from ippidb.models import Bibliography, Protein, Taxonomy +from ippidb.models import Bibliography, Protein, Taxonomy, MolecularFunction class Command(BaseCommand): @@ -59,6 +59,8 @@ class Command(BaseCommand): self.stdout.write(self.style.SUCCESS('Successfully flushed protein table')) Taxonomy.objects.all().delete() self.stdout.write(self.style.SUCCESS('Successfully flushed taxonomy table')) + MolecularFunction.objects.all().delete() + self.stdout.write(self.style.SUCCESS('Successfully flushed molecular function table')) for row in rows: try: p = Protein()