Skip to content

Handle null fileSize SUM, null facilityName, int download_id#83

Merged
patrick-austin merged 1 commit into36_queuingfrom
handle-null-sum
Apr 28, 2025
Merged

Handle null fileSize SUM, null facilityName, int download_id#83
patrick-austin merged 1 commit into36_queuingfrom
handle-null-sum

Conversation

@patrick-austin
Copy link

SUM of an empty list returns null, which was causing JSON casting exception. Now check the type, and return 0L for the null case (an empty dataset should be treated as 0).

The default facilityName behaviour only worked for login. For the queue endpoints, it got the default urls OK but then facilityName was still null when it tried to persist the Download, which is not a nullable field. Now, get the default name for that as well as the urls.

The refactored _expire_download formatted the url such that download_id needed to be a string. This was the case for the direct call, but not option 5 which loads integers from the JSON response. Changed this and other locations to use f-strings, which will handle string or integer arguments gracefully.

@patrick-austin patrick-austin merged commit fbf928b into 36_queuing Apr 28, 2025
1 check passed
@patrick-austin patrick-austin deleted the handle-null-sum branch April 28, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants