tsteuer пре 4 година
родитељ
комит
0ca94e96a7
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      cdplib/db_handlers/SQLHandler.py

+ 1 - 1
cdplib/db_handlers/SQLHandler.py

@@ -216,7 +216,7 @@ class SQLHandler:
             if len(sub_query) > 0:
                 try:
                     result = connection.execute(sub_query)
-                    if result.rowcount > 0 and not re.search('drop|delete', sub_query, re.IGNORECASE):
+                    if result.returns_rows:
                         data = pd.DataFrame(result.fetchall())
                         data.columns = result.keys()
                         results.append(data)