Skip to content

Commit 821ae79

Browse files
committed
use repr() for displaying query logging args
Strings should be quoted, for instance.
1 parent 1822577 commit 821ae79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_mongodb/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def log(self, op, duration, args, kwargs=None):
4646
# If kwargs are used by any operations in the future, they must be
4747
# added to this logging.
4848
msg = "(%.3f) %s"
49-
args = ", ".join(str(arg) for arg in args)
49+
args = ", ".join(repr(arg) for arg in args)
5050
operation = f"db.{self.collection_name}{op}({args})"
5151
if len(settings.DATABASES) > 1:
5252
msg += f"; alias={self.db.alias}"

0 commit comments

Comments
 (0)