diff --git a/dspace_statistics_api/app.py b/dspace_statistics_api/app.py index aa129c8..28bddcd 100644 --- a/dspace_statistics_api/app.py +++ b/dspace_statistics_api/app.py @@ -90,7 +90,7 @@ class AllStatisticsResource: ) # create a list to hold dicts of stats - statistics = list() + statistics = [] # iterate over results and build statistics object for result in cursor: @@ -162,7 +162,7 @@ class AllStatisticsResource: ) # create a list to hold dicts of stats - statistics = list() + statistics = [] # iterate over views dict to extract views and use the element id as an # index to the downloads dict to extract downloads. diff --git a/dspace_statistics_api/util.py b/dspace_statistics_api/util.py index 8879272..ae292e1 100644 --- a/dspace_statistics_api/util.py +++ b/dspace_statistics_api/util.py @@ -140,7 +140,7 @@ def validate_post_parameters(req, resp, resource, params): description=f'The "{req.context.statistics_scope}" parameter is invalid. The value must be a comma-separated list of UUIDs.', ) else: - req.context.elements = list() + req.context.elements = [] def set_statistics_scope(req, resp, resource, params):