From b25dc4ad605516d53f1cff2652b0225722f68197 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Fri, 27 Mar 2020 12:50:28 -0500 Subject: [PATCH] Fix #102 --- CHANGES.rst | 3 ++- src/nti/externalization/externalization/externalizer.py | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 56b6bf5..98dbe8c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,8 @@ 1.1.1 (unreleased) ================== -- Nothing changed yet. +- Fix a faulty assertion error. See `issue 102 + `_. 1.1.0 (2020-03-27) diff --git a/src/nti/externalization/externalization/externalizer.py b/src/nti/externalization/externalization/externalizer.py index 422091e..f008117 100644 --- a/src/nti/externalization/externalization/externalizer.py +++ b/src/nti/externalization/externalization/externalizer.py @@ -361,10 +361,8 @@ def to_external_object( no decaration """ # Catch the primitives up here, quickly. This catches - # numbers, strings, and None. Only do this if we're not on the - # second-pass fallback; that means that some representer couldn't handle - # a primitive natively (usually a decimal) - if name != 'second-pass' and isinstance(obj, PRIMITIVES): + # numbers, strings, and None. + if isinstance(obj, PRIMITIVES): return obj manager_top = _manager_get() # (name, memos)