Skip to content

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

Merged
jedie merged 2 commits intojedie:masterfrom
Lagovas:master
Dec 22, 2016
Merged

Fix case when model has template field which is ForeignKey#85
jedie merged 2 commits intojedie:masterfrom
Lagovas:master

Conversation

@Lagovas
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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