Skip to content

Commit

Permalink
allowing diffs for old and new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Galithil committed Aug 18, 2016
1 parent 2d0e83f commit 8e3fa09
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions LIMS2DB/diff.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@

import LIMS2DB.objectsDB.objectsDB as DB
import pprint

from LIMS2DB.classes import ProjectSQL
from genologics.config import BASEURI, USERNAME, PASSWORD
from genologics.lims import Lims
from LIMS2DB.utils import setupLog
Expand All @@ -29,19 +25,18 @@ def diff_project_objects(pj_id, couch, logfile, new=True):
old_project.pop('modification_time', None)
old_project.pop('creation_time', None)

try:
if new:
session=get_session()
host=get_configuration()['url']
new_project=ProjectSQL(session, log, pj_id, host)
else:
new_project = DB.ProjectDB(lims, pj_id, samp_db, log)
except:
return {}
if new:
from LIMS2DB.classes import ProjectSQL
session=get_session()
host=get_configuration()['url']
new_project=ProjectSQL(session, log, pj_id, host, couch)
else:
import LIMS2DB.objectsDB.objectsDB as DB
new_project = DB.ProjectDB(lims, pj_id, samp_db, log)

fediff=diff_objects(old_project, new_project.obj)

return fediff
return (fediff, old_project, new_project.obj)



Expand Down

0 comments on commit 8e3fa09

Please sign in to comment.