Skip to content

Commit

Permalink
Change some dict checks to gets
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanconn committed Oct 3, 2024
1 parent 29c0d07 commit 3e2472e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mica/vv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def _save_info_json(self, file=None):
logger.info("Saved JSON to {}".format(file))

def slots_to_db(self):
if self.info()["aspect_1_id"] is None:
if self.info().get("aspect_1_id") is None:
logger.warning(
"Database save not implemented for obsids without aspect_1_ids"
)
Expand Down Expand Up @@ -300,7 +300,7 @@ def _get_ccd_temp(tstart, tstop):

def slots_to_table(self):
save = self.info()
if save["aspect_1_id"] is None:
if save.get("aspect_1_id") is None:
logger.warning("Table save not implemented for obsids without aspect_1_ids")
return
mean_aacccdpt = self._get_ccd_temp(save["tstart"], save["tstop"])
Expand Down

0 comments on commit 3e2472e

Please sign in to comment.