diff --git a/mongo_connector/doc_managers/formatters.py b/mongo_connector/doc_managers/formatters.py index d5d6fca1..97874629 100644 --- a/mongo_connector/doc_managers/formatters.py +++ b/mongo_connector/doc_managers/formatters.py @@ -87,7 +87,7 @@ def transform_value(self, value): # Just include body of binary data without subtype return base64.b64encode(value).decode() elif isinstance(value, UUID): - return value.hex + return value elif isinstance(value, (int, long, float)): if isnan(value): raise ValueError("nan") diff --git a/tests/test_formatters.py b/tests/test_formatters.py index 64c5d3a7..5b85a922 100644 --- a/tests/test_formatters.py +++ b/tests/test_formatters.py @@ -65,7 +65,7 @@ def test_types(self): self.assertEqual(trans(self.date), self.date) # UUID - self.assertEqual(trans(self.xuuid), self.xuuid.hex) + self.assertEqual(trans(self.xuuid), self.xuuid) # Other type self.assertEqual(trans(self.oid), str(self.oid))