diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-04 18:43:50 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-04 18:43:50 -0800 |
commit | d0b9e988aa3a5ee3cc44ab1cb6f86b524c71d056 (patch) | |
tree | cd14b1de9d0b24eed5515ebe84c12ddbd73d01a8 /python/fatcat_web | |
parent | d2191728cebbfd357af8ffa6d9461910b3412448 (diff) | |
download | fatcat-d0b9e988aa3a5ee3cc44ab1cb6f86b524c71d056.tar.gz fatcat-d0b9e988aa3a5ee3cc44ab1cb6f86b524c71d056.zip |
search: fix 'max() arg is an empty sequence'
Diffstat (limited to 'python/fatcat_web')
-rw-r--r-- | python/fatcat_web/search.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat_web/search.py b/python/fatcat_web/search.py index b069e315..8cbe09f6 100644 --- a/python/fatcat_web/search.py +++ b/python/fatcat_web/search.py @@ -869,9 +869,9 @@ def get_elastic_container_preservation_by_volume(query: ReleaseQuery) -> List[di [int(h["key"]["volume"]) for h in buckets if h["key"]["volume"].isdigit()] ) volume_dicts = dict() - if max(volume_nums) - min(volume_nums) > 500: - raise Exception("too many volume histogram buckets") if volume_nums: + if max(volume_nums) - min(volume_nums) > 500: + raise Exception("too many volume histogram buckets") for num in range(min(volume_nums), max(volume_nums) + 1): volume_dicts[num] = dict(volume=num, bright=0, dark=0, shadows_only=0, none=0) for row in buckets: |