Private
Public Access
1
0

better power zones

This commit is contained in:
Sander Roosendaal
2022-12-15 22:10:37 +01:00
parent 98f2ff2707
commit 47d8dd63d3
6 changed files with 134 additions and 103 deletions

View File

@@ -6283,7 +6283,15 @@ def thumbnails_set(r, id, favorites):
columns += ['time']
rowdata = dataprep.getsmallrowdata_db(columns, ids=[id], doclean=True)
rowdata.dropna(axis=1, how='all', inplace=True)
try:
rowdata.dropna(axis=1, how='all', inplace=True)
except TypeError:
return [
{'script': "",
'div': "",
'notes': ""
}]
if rowdata.empty:
try:
@@ -6303,12 +6311,6 @@ def thumbnails_set(r, id, favorites):
'notes': ""
}]
# else:
# try:
# rowdata.sort_values(by='time',ascending=True,inplace=True)
# except KeyError:
# pass
lengte = len(rowdata)
maxlength = 50
if lengte > maxlength: