Skip to content

Commit 6fb07c4

Browse files
authored
make regime column optional (#178)
1 parent 09c2b12 commit 6fb07c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

astrodb_utils/photometry.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ def ingest_photometry(
153153
{
154154
"source": db_name,
155155
"band": band,
156-
"regime": regime,
157156
"magnitude": str(
158157
magnitude
159158
), # Convert to string to maintain significant digits
@@ -164,6 +163,10 @@ def ingest_photometry(
164163
"reference": reference,
165164
}
166165
]
166+
# In case regime column is not present
167+
if regime is not None:
168+
photometry_data[0]["regime"] = regime
169+
167170
logger.debug(f"Photometry data: {photometry_data}")
168171

169172
try:

0 commit comments

Comments
 (0)