Index: trunk/ippToPsps/jython/detectionbatch.py
===================================================================
--- trunk/ippToPsps/jython/detectionbatch.py	(revision 31951)
+++ trunk/ippToPsps/jython/detectionbatch.py	(revision 31965)
@@ -533,7 +533,8 @@
     Updates provided table with DVO IDs from DVO table
     '''
-    def updateDvoIDs(self, table, sourceID, imageID):
-
-        self.logger.debug("Updating table '" + table + "' with DVO IDs using imageID = " + imageID)
+    def updateDvoIDs(self, table, sourceID, externID):
+
+        imageID = self.scratchDb.getImageIDFromExternID(sourceID, externID)
+        self.logger.debug("Updating table '" + table + "' with DVO IDs using imageID = %d" % imageID)
         sql = "UPDATE IGNORE " + table + " AS a, " + self.scratchDb.dvoDetection + " AS b SET \
                a.ippObjID = b.ippObjID, \
@@ -617,5 +618,5 @@
                 # store sourceID/imageID combo in Db so DVO can look up later
                 if not self.useFullTables:
-                    self.scratchDb.insertNewDvoImage(header['SOURCEID'], header['IMAGEID'])
+                    self.scratchDb.insertNewDvoExternID(header['SOURCEID'], header['IMAGEID'])
 
                 # store these for later
