Skip to content

Conversation

vdboor
Copy link
Contributor

@vdboor vdboor commented Feb 16, 2016

This avoids storing an ugettext value in self.version.
It's value got parsed in ids = [int(v) for v in self.value]
causing an int("F") call that fails.

Instead, a sentinal value is introduced that can be recognized in the
code, yet output a meaningful message when it's shown to the user.

Fixes #44

This is a rebased version of #54

"""

def __str__(self):
return force_text(_("Field Didn't exist!"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "Didn't" must be lower case, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a commit for that!

cc #54 (comment) :-)

This avoids storing an ugettext value in self.version.
It's value got parsed in `ids = [int(v) for v in self.value]`
causing an `int("F")` call that fails.

Instead, a sentinal value is introduced that can be recognized in the
code, yet output a meaningful message when it's shown to the user.

Fixes jedie#44
jedie added a commit that referenced this pull request Feb 16, 2016
Fix Python error when ManyToMany relations didn't exist.
@jedie jedie merged commit 5d42adf into jedie:master Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants