Skip to content

Commit

Permalink
update identity_key results unpacking
Browse files Browse the repository at this point in the history
sqlalchemy now returns a third member to the identity_key result (since 1.2.0, commit 50d9f1687), we must ignore it.
  • Loading branch information
tshirtman committed Jan 10, 2018
1 parent 6e4e771 commit b482883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wtforms_sqlalchemy/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,5 @@ def pre_validate(self, form):


def get_pk_from_identity(obj):
cls, key = identity_key(instance=obj)
cls, key = identity_key(instance=obj)[:2]
return ':'.join(text_type(x) for x in key)

0 comments on commit b482883

Please sign in to comment.