Skip to content

Commit

Permalink
ForcedSource 'band' must be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
isullivan committed Jan 13, 2025
1 parent a3b77ff commit e77a83a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/lsst/ap/association/testApdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ def runForcedMeasurement(self, diaObjects, idGenerator, visit, detector):
preserveColumns.append("visit")
baseForcedSources["detector"] = detector
preserveColumns.append("detector")
baseForcedSources["band"] = 'noBand'
preserveColumns.append("band")
baseForcedSources["diaForcedSourceId"] = [idGenerator() for i in range(len(baseForcedSources))]
preserveColumns.append("diaForcedSourceId")
# Fill the forced sources for each diaObject with random data
Expand Down Expand Up @@ -595,10 +597,7 @@ def writeToApdb(self, updatedDiaObjects, associatedDiaSources, diaForcedSources,
diaSourceStore = None
else:
diaSourceStore = dropEmptyColumns(self.schema, associatedDiaSources, tableName="DiaSource")
if diaForcedSources.empty:
diaForcedSourceStore = None
else:
diaForcedSourceStore = dropEmptyColumns(self.schema, diaForcedSources, tableName="DiaForcedSource")
diaForcedSourceStore = dropEmptyColumns(self.schema, diaForcedSources, tableName="DiaForcedSource")
self.apdb.store(
dateTime,
diaObjectStore,
Expand Down

0 comments on commit e77a83a

Please sign in to comment.