Index: trunk/ippToPsps/jython/forcedwarpbatch.py
===================================================================
--- trunk/ippToPsps/jython/forcedwarpbatch.py	(revision 38802)
+++ trunk/ippToPsps/jython/forcedwarpbatch.py	(revision 38806)
@@ -111,5 +111,6 @@
            self.expID[num] = meta[0]
            self.expTime[num] = meta[1]
-           self.analysisVer[num] = meta[2]
+# This isn't populated in the database (it's NULL).  The hack is below.
+#           self.analysisVer[num] = meta[2]
            self.skycellName[num] = meta[3]
            self.tessName[num] = meta[4]
@@ -123,4 +124,7 @@
        #tessName = self.getKeyValue(self.header, 'TESS_ID')
        #self.tessID = self.scratchDb.getTessID(tessName)
+
+           # As the database doesn't have the software_ver entry, pull the photometry version as the analysis version.
+           self.analysisVer[num] = self.getKeyValue(self.header[num],"PHOT_V")
 
            if not self.analysisVer[num]: self.analysisVer[num] = -999
@@ -241,5 +245,5 @@
       
 #        self.logger.infoPair("building sql ","3")
-        sqlLine.group("analVer",           str(self.analysisVer[num]))
+        sqlLine.group("analysisVer",           str(self.analysisVer[num]))
  #       self.logger.infoPair("building sql ","3")
 
