Skip to content

Commit fce4f53

Browse files
committed
fix count
1 parent 054c70b commit fce4f53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiita_db/user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ def delete(cls, email, force=False):
345345
with qdb.sql_connection.TRN:
346346
sql = f"SELECT COUNT(email) FROM {t} WHERE email = %s"
347347
qdb.sql_connection.TRN.add(sql, [email])
348-
count = qdb.sql_connection.TRN.execute_fetchflatten()
349-
if count:
348+
count = qdb.sql_connection.TRN.execute_fetchflatten()[0]
349+
if count != 0:
350350
not_empty.append(t)
351351

352352
if not_empty and not force:

0 commit comments

Comments
 (0)