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

Update Menu.save() method to pass *args and **kwargs argument. The curre... #9

Merged
merged 1 commit into from Sep 1, 2013
Merged

Conversation

jondbaker
Copy link

...nt

implementation explicitly lists force_insert and force_update only. Considering
the full list of kwargs save() expects includes 'using' and 'update_fields',
this is problematic if these kwargs need to be specified when saving a new Menu
object. For example, when create a new Menu with factory-boy, the user is
presented with the following error: "TypeError: save() got an unexpected
keyword argument 'using'". Since the current implementation uses the default
values for force_insert and force_update anyway, simply passing _args and
*_kwargs is an acceptable way to fulfill the underlying API contract.

…rrent

implementation explicitly lists force_insert and force_update only. Considering
the full list of kwargs save() expects includes 'using' and 'update_fields',
this is problematic if these kwargs need to be specified when saving a new Menu
object. For example, when create a new Menu with factory-boy, the user is
presented with the following error: "TypeError: save() got an unexpected
keyword argument 'using'". Since the current implementation uses the default
values for force_insert and force_update anyway, simply passing *args and
**kwargs is an acceptable way to fulfill the underlying API contract.
rossp added a commit that referenced this pull request Sep 1, 2013
Update Menu.save() method to pass *args and **kwargs argument. The curre...
@rossp rossp merged commit 7d5cc41 into rossp:master Sep 1, 2013
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

2 participants