Skip to content

Commit 15146b1

Browse files
committed
Fix __len__()
1 parent 89384f6 commit 15146b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datajoint/expression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def __len__(self):
443443
""":return: number of elements in the result set e.g. ``len(q1)``."""
444444
return self.connection.query(
445445
'SELECT {select_} FROM {from_}{where}'.format(
446-
select_=('DISTINCT count(*)' if any(self._left)
446+
select_=('count(*)' if any(self._left)
447447
else 'count(DISTINCT {fields})'.format(fields=self.heading.as_sql(
448448
self.primary_key, include_aliases=False))),
449449
from_=self.from_clause(),

0 commit comments

Comments
 (0)