mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2025-05-09 14:46:01 +02:00
Apply fixes from fixit
RewriteToLiteral: It's slower to call list() than using the empty literal
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user