Treatment

This commit is contained in:
Matthew Ryan Dillon 2016-02-01 14:39:59 -07:00
parent ab1d605c95
commit a8a87f7ddb
5 changed files with 65 additions and 17 deletions

View file

@ -17,7 +17,7 @@ from ccdb.processing.models import ProcessType, Reagent, Flaw, Processing
from ccdb.collections_ccdb.models import CollectionType, CollectionMethod, \
Flaw, ADFGPermit, Collection
from ccdb.experiments.models import Flaw, Experiment, ProtocolAttachment, \
TreatmentType
TreatmentType, Treatment
class Command(BaseCommand):
@ -230,3 +230,9 @@ def _import_admin_data():
tt = TreatmentType(experiment_id=r[0], id=r[1], name=r[2], code=r[3],
treatment_type=r[4], placement=r[5], description=r[6])
tt.save()
# Treatment
for r in c.execute('SELECT * FROM tbl_treatments;'):
t = Treatment(id=r[0], treatment_type_id=r[1], container_id=r[2],
study_location_id=r[3], species_id=r[4], sex=r[5])
t.save()