fix for inappropriate syntax for % operator

Issue #1506 resolved
Former user created an issue

In sqlalchemy/orm/identity.py:123:

    def add(self, state):
        if state.key in self:
            if dict.__getitem__(self, state.key) is not state:
E               raise AssertionError("A conflicting state is already present in the identity map for key %r" % state.key)
>               TypeError: not all arguments converted during string formatting

The problem is that state.key seems to be a tuple and % thinks you want something different.

Fix:

              raise AssertionError("A conflicting state is already present in the identity map for key %r" % (state.key, ))

Comments (3)

  1. Log in to comment