Skip to content

Commit

Permalink
Fixing project selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Galithil committed Aug 24, 2016
1 parent 96c027f commit e4c9347
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/project_summary_upload_LIMS.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,9 @@ def main(options):
P.save()
else :
projects=create_projects_list(options, lims_db, mainlims, mainlog)
masterProcess(options,projects, mainlims, mainlog)
lims_db.commit()
lims_db.close()
print(projects)
masterProcess(options,projects, mainlims, mainlog)

def create_projects_list(options, db_session,lims, log):
projects=[]
Expand All @@ -145,7 +144,7 @@ def create_projects_list(options, db_session,lims, log):
valid_projects=[Project(lims, id=x) for x in project_ids]
log.info("project list : {0}".format(" ".join([p.id for p in valid_projects])))
else:
valid_projects=db_session.query(DBProject).filter(DBProject.luid in project_ids).all()
valid_projects=db_session.query(DBProject).filter(DBProject.luid.in_(project_ids)).all()
log.info("project list : {0}".format(" ".join([p.luid for p in valid_projects])))
return valid_projects
else:
Expand Down

0 comments on commit e4c9347

Please sign in to comment.