Skip to content

Commit

Permalink
json loaded the string and created a variable for the image header
Browse files Browse the repository at this point in the history
  • Loading branch information
Carolina Capetillo committed Oct 19, 2023
1 parent a492206 commit f7e2a2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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)

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

"username": self.username,
"user_id": self.user_id,
"SMARTSTK": self.header.SMARTSTK if self.header is not None else '',
"SSTKNUM": self.header.SSTKNUM if self.header is not None else ''
"SMARTSTK": header_dictionary.SMARTSTK if self.header is not None else '',
"SSTKNUM": header_dictionary.SSTKNUM if self.header is not None else ''
}

# Convert to timestamp in milliseconds
Expand Down

0 comments on commit f7e2a2b

Please sign in to comment.