mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-10 00:28:22 -05:00
shouldn't be necessary but apperently is
This commit is contained in:
@@ -239,7 +239,8 @@ def system(request):
|
|||||||
|
|
||||||
for x in r.zrange('api:space-request-count', 0, 20, withscores=True, desc=True):
|
for x in r.zrange('api:space-request-count', 0, 20, withscores=True, desc=True):
|
||||||
s = x[0].decode('utf-8')
|
s = x[0].decode('utf-8')
|
||||||
space_stats = [Space.objects.get(pk=s).name, x[1]]
|
if space := Space.objects.filter(pk=s).first():
|
||||||
|
space_stats = [space.name, x[1]]
|
||||||
for i in range(0, 6):
|
for i in range(0, 6):
|
||||||
d = (date.today() - timedelta(days=i)).isoformat()
|
d = (date.today() - timedelta(days=i)).isoformat()
|
||||||
space_stats.append(r.zscore(f'api:space-request-count:{d}', s))
|
space_stats.append(r.zscore(f'api:space-request-count:{d}', s))
|
||||||
|
|||||||
Reference in New Issue
Block a user