Skip to content

Commit

Permalink
sql log reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
acwhite211 committed Jan 17, 2025
1 parent 87df266 commit f3fc2f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specifyweb/specify/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def log_sqlalchemy_query(query):
# Call this function to debug the raw SQL query generated by SQLAlchemy
from sqlalchemy.dialects import mysql
compiled_query = query.statement.compile(dialect=mysql.dialect(), compile_kwargs={"literal_binds": True})
raw_sql = str(compiled_query)
raw_sql = str(compiled_query).replace('\n', ' ') + ';'
logger.debug(raw_sql)
# Run in the storred_queries.execute file, in the execute function, right before the return statement, line 546
# from specifyweb.specify.utils import log_sqlalchemy_query; log_sqlalchemy_query(query)
Expand Down

0 comments on commit f3fc2f7

Please sign in to comment.