Skip to content

Commit

Permalink
Merge pull request #68 from LCOGT/dev
Browse files Browse the repository at this point in the history
Fix/api-issue
  • Loading branch information
capetillo authored Oct 20, 2023
2 parents e8348fc + ded7f86 commit c0bdc0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def get_image_pkg(self):
Notably missing from this is the entire fits header, for smaller
payload sizes.
"""
header_dictionary = json.loads(self.header) if self.header is not None else None

package = {
"image_id": self.image_id,
Expand All @@ -114,7 +115,8 @@ def get_image_pkg(self):

"username": self.username,
"user_id": self.user_id,
"header": json.loads(self.header) if self.header is not None else self.header
"SMARTSTK": header_dictionary.get("SMARTSTK", '') if header_dictionary is not None else '',
"SSTKNUM": header_dictionary.get("SSTKNUM", '') if header_dictionary is not None else ''
}

# Convert to timestamp in milliseconds
Expand Down

0 comments on commit c0bdc0c

Please sign in to comment.