Skip to content

Commit

Permalink
Fix another issue when serializing to FITS queue.
Browse files Browse the repository at this point in the history
Null areas should be sent as null in the JSON payload.
  • Loading branch information
mgdaily committed Sep 17, 2024
1 parent a67cd87 commit 144ab1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.5.4
2024-09-17
Make sure we handle files that don't have an area associated with them when sending to the FITS queue

2.5.3
2024-09-16
Make sure we can properly JSON serialize the FITS queue payload
Expand Down
2 changes: 1 addition & 1 deletion archive/frames/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_file_store_path(filename, file_metadata):

def archived_queue_payload(validated_data: dict, frame):
new_dictionary = validated_data.get('headers').copy()
new_dictionary['area'] = validated_data.get('area').json
new_dictionary['area'] = validated_data.get('area').json if validated_data.get('area') else None
new_dictionary['basename'] = validated_data.get('basename')
new_dictionary['version_set'] = validated_data.get('version_set')
new_dictionary['filename'] = frame.filename
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "science-archive"
version = "2.5.3"
version = "2.5.4"
description = ""
authors = ["Jashandeep Sohi <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 144ab1b

Please sign in to comment.