Skip to content

Commit 1ff17fd

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

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
@@ -45,7 +45,7 @@ def log(self, op, duration, args, kwargs=None):
4545
# If kwargs are used by any operations in the future, they must be
4646
# added to this logging.
4747
msg = "(%.3f) %s"
48-
args = ", ".join(str(arg) for arg in args)
48+
args = ", ".join(repr(arg) for arg in args)
4949
collection_name = f"{self.collection.name}." if self.collection is not None else ""
5050
operation = f"db.{collection_name}{op}({args})"
5151
if len(settings.DATABASES) > 1:

0 commit comments

Comments
 (0)