value_as_iterable editorializing result

Issue #1442 resolved
Mike Bayer repo owner created an issue

breaks a merge() of list-based attributes (like picklable list, PGArray), this patch repairs:

Index: lib/sqlalchemy/orm/state.py
===================================================================
--- lib/sqlalchemy/orm/state.py (revision 6049)
+++ lib/sqlalchemy/orm/state.py (working copy)
@@ -111,8 +111,8 @@
             return None
         elif hasattr(impl, 'get_collection'):
             return impl.get_collection(self, dict_, x, passive=passive)
-        elif isinstance(x, list):
-            return x
+#        elif isinstance(x, list):
+#            return x
         else:
             return [x](x)

need to determine if there's some use case where a not-yet-instrumented collection finds its way at that point (I'm thinking not since its accessed via get()).

Comments (3)

  1. Log in to comment