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

Changes the first argument name in _fill_model_fields #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rogerhil
Copy link

@rogerhil rogerhil commented Feb 6, 2014

Changes the first argument name in the function _fill_model_fields from "model" to "_model_class" to avoid conflict in kwargs.

Sometimes a Django model may have an attribute with a name "model", so it cause a conflict when trying to run django_any(...).

E.g.:

>>> kwargs = dict(brand='Apple', model='MacBook')
>>> django_any(SomeModelClass, **kwargs)
TypeError: _fill_model_fields() got multiple values for keyword argument 'model'

Now this argument is called "_model_class"

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.

None yet

1 participant