Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixe exception "too many values to unpack" on many to many fields #11

Merged

Conversation

thivolle-cazat-cedric
Copy link
Contributor

Traceback (most recent call last):
 [...]
  File [...]/wtforms_sqlalchemy/fields.py", line 189, in get_pk_from_identity
ValueError: too many values to unpack (expected 2)

https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/orm/util.py#L225
get_pk_from_identity expect tuple with 2 elements, but, sqlalchemy identity_keyreturn tuple with 3 elements.

cls it is not used, so i only take the element 2.
I tried to run test, but 1 fails, on master too ERROR: test_convert_types (tests.tests.ModelFormTest)

running on my environment, it fix my trouble

@coveralls
Copy link

coveralls commented Mar 7, 2018

Coverage Status

Coverage remained the same at 89.615% when pulling 50d08f2 on thivolle-cazat-cedric:feature-compat-identity_key into 6cfdbc4 on wtforms:master.

@davidism davidism merged commit df09049 into wtforms:master Jun 29, 2018
@davidism davidism added this to the 0.2 milestone Jun 29, 2018
@ilpssun
Copy link

ilpssun commented Jan 18, 2019

When will 0.2 be released?

mx-moth pushed a commit to mx-moth/wtforms-sqlalchemy that referenced this pull request Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants