From dd97531e80e0a651b199f27a0da7dfd8f66d3069 Mon Sep 17 00:00:00 2001 From: tgm Date: Wed, 21 Sep 2022 16:51:53 +0200 Subject: [PATCH] Fix issue #1486 This solution seems to fit the current code best, but alternatively one could get the value earlier and return `UuidRepresentation.STANDARD` early if the value is of a non-string type. --- eve/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eve/utils.py b/eve/utils.py index 9c028b8d0..d5fccdad2 100644 --- a/eve/utils.py +++ b/eve/utils.py @@ -348,7 +348,7 @@ def uuid_representation_as_string(): "javaLegacy": UuidRepresentation.JAVA_LEGACY, } return uuid_map[ - config.MONGO_OPTIONS.get("uuidRepresentation", UuidRepresentation.STANDARD) + config.MONGO_OPTIONS.get("uuidRepresentation", "standard") ] if ignore_fields: