Skip to content

Commit 264e3aa

Browse files
committed
Fix
1 parent 1cd8b66 commit 264e3aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/server/modules/blueprints/charts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ def attribute(attribute_ids, date):
2323
for attribute_id in attribute_ids:
2424
data_units = DataUnit.select(
2525
lambda data_unit: data_unit.attribute.id == attribute_id and data_unit.date == date
26-
)
26+
)[:]
2727

2828
print("Time of query:\t\t", datetime.now().time())
2929

30-
if not data_units:
30+
if not data_units or len(data_units) == 0:
3131
continue
3232

33-
first_data_unit = data_units.first()
33+
first_data_unit = data_units[0]
3434
attr = first_data_unit.attribute
3535

3636
charts_data.append(

0 commit comments

Comments
 (0)