Skip to content
Snippets Groups Projects
Commit c05d72b3 authored by Fabien  MAREUIL's avatar Fabien MAREUIL
Browse files

Merge branch 'master' of gitlab.pasteur.fr:odoppelt/iPPIDB

Former-commit-id: 3bcf287982e19beea821b1414d4de587adcc8cf2
parents 606d682d f1b9812f
No related branches found
No related tags found
No related merge requests found
......@@ -116,13 +116,26 @@ class Command(BaseCommand):
else:
b.source = 'PT'
b.id_source = row[2]
b.cytotox = row[6]=='Y'
b.in_silico = row[7]=='Y'
b.in_vitro = row[8]=='Y'
b.in_vivo = row[9]=='Y'
b.in_cellulo = row[10]=='Y'
b.pharmacokinetic = row[11]=='Y'
b.xray = row[12]=='Y'
b.save(autofill=True)
except Exception as e:
self.stdout.write(
self.style.ERROR('Failed inserting {}'.format(row[2])))
if options['stoponfail']:
import traceback
self.stderr.write(traceback.format_exc())
raise CommandError(
'Failed inserting {} {}'.format(row[1], row[2]))
else:
self.stdout.write(
self.style.ERROR('Failed inserting {} {}'.format(row[1], row[2])))
else:
self.stdout.write(
self.style.SUCCESS('Successfully inserted {}'.format(row[2])))
self.style.SUCCESS('Successfully inserted {} {}'.format(row[1], row[2])))
if options['proteins']:
cursor.execute("""SELECT * FROM protein""")
rows = cursor.fetchall()
......
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