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

Fix case when model has template field which is ForeignKey #85

Merged
merged 2 commits into from
Dec 22, 2016
Merged

Fix case when model has template field which is ForeignKey #85

merged 2 commits into from
Dec 22, 2016

Conversation

Lagovas
Copy link
Contributor

@Lagovas Lagovas commented Dec 22, 2016

When model has field with name "template" and has ForeignKey type next code

def _get_compare_func(suffix):
            # logger.debug("func_name: %s", func_name)
            func_name = "compare_%s" % suffix
            if hasattr(self, func_name):
                func = getattr(self, func_name)
                if callable(func):
                    return func

get compare_template field from VersionAdmin class which is str object, not callable.

@coveralls
Copy link

coveralls commented Dec 22, 2016

Coverage Status

Coverage increased (+0.02%) to 86.772% when pulling 7c01ab5 on Lagovas:master into 265f4e6 on jedie:master.

@jedie jedie merged commit f52f392 into jedie:master Dec 22, 2016
@jedie
Copy link
Owner

jedie commented Feb 8, 2017

Sorry for the late response time... This pull request is no release with v0.7.3 ;)

Thanks for contribution!

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.

3 participants