We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cd8b66 commit 264e3aaCopy full SHA for 264e3aa
src/server/modules/blueprints/charts.py
@@ -23,14 +23,14 @@ def attribute(attribute_ids, date):
23
for attribute_id in attribute_ids:
24
data_units = DataUnit.select(
25
lambda data_unit: data_unit.attribute.id == attribute_id and data_unit.date == date
26
- )
+ )[:]
27
28
print("Time of query:\t\t", datetime.now().time())
29
30
- if not data_units:
+ if not data_units or len(data_units) == 0:
31
continue
32
33
- first_data_unit = data_units.first()
+ first_data_unit = data_units[0]
34
attr = first_data_unit.attribute
35
36
charts_data.append(
0 commit comments