#8662: over writing save() raises error when using Model.objects.create()
---------------------------+------------------------------------------------
Reporter: pjs | Owner: nobody
Status: new | Milestone:
Component: Documentation | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
---------------------------+------------------------------------------------
It seems that when over writing .save() (and maybe other default methods)
you should be accepting *args, **kwargs and passing it along.
I get an exception when using Model.objects.create():
Traceback:
File "/usr/local/lib/python2.5/site-packages/django/core/handlers/base.py"
in get_response
86. response = callback(request, *callback_args,
**callback_kwargs)
File "/home/pjs/site/netlandish/../netlandish/ccproc/views.py" in
order_process
41. form_data.get('custom', '')
File "/home/pjs/site/netlandish/../netlandish/billing/helpers.py" in
build_sale
48. ip=ip
File "/usr/local/lib/python2.5/site-packages/django/db/models/manager.py"
in create
87. return self.get_query_set().create(**kwargs)
File "/usr/local/lib/python2.5/site-packages/django/db/models/query.py" in
create
311. obj.save(force_insert=True)
Exception Type: TypeError at /order/1027/
Exception Value: save() got an unexpected keyword argument 'force_insert'
My custom .save() didn't have anything catching force_insert..
The docs don't show this is required.
--
Ticket URL: <http://code.djangoproject.com/ticket/8662>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---