From 58e9242cda219631a41da56bda2007fd1f6c05f9 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Sun, 12 Jan 2014 22:38:18 -0500 Subject: [PATCH] Fix bug when storing the simple reduced state. This feature was earlier added, but this was clearly a bug. --- src/mongopersist/serialize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongopersist/serialize.py b/src/mongopersist/serialize.py index 5809101..031d79d 100644 --- a/src/mongopersist/serialize.py +++ b/src/mongopersist/serialize.py @@ -155,7 +155,7 @@ def get_non_persistent_state(self, obj, seen): if isinstance(reduced, str): # When the reduced state is just a string it represents a name in # a module. The module will be extrated from __module__. - return {'_py_constant': obj.__module__+'.'+reduced[0]} + return {'_py_constant': obj.__module__+'.'+reduced} if len(reduced) == 2: factory, args = reduced obj_state = {}