From 144ab1b6a57da0fa38d5290246383dd7989fa572 Mon Sep 17 00:00:00 2001 From: Matt Daily Date: Tue, 17 Sep 2024 08:05:09 -0700 Subject: [PATCH] Fix another issue when serializing to FITS queue. Null areas should be sent as null in the JSON payload. --- CHANGELOG | 4 ++++ archive/frames/utils.py | 2 +- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d8145a3..bce1020 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/archive/frames/utils.py b/archive/frames/utils.py index b299524..9769697 100644 --- a/archive/frames/utils.py +++ b/archive/frames/utils.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index bc21201..7053c88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "science-archive" -version = "2.5.3" +version = "2.5.4" description = "" authors = ["Jashandeep Sohi "] readme = "README.md"