#13299: Handicapped objects passed to models signals during loaddata ------------------------------------+--------------------------------------- Reporter: patrys | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: 1.2-beta Resolution: | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ------------------------------------+--------------------------------------- Changes (by patrys):
* needs_better_patch: => 0 * needs_tests: => 0 * needs_docs: => 0 Comment: Ok, after consulting current trunk I see that `raw` kwarg is already being passed to the signal so I guess this is a documentation request. Maybe something like: There are some rare cases (for example during fixture loading) when your `post_save` and `pre_save` signal handlers receive a "raw" instance. This is signalled by passing `True` for the `raw` keyword argument. "Raw" instances do not contain any fields inherited from the parent model. If your application relies on model inheritance, make sure you take this into account. You can get a regular instance by using code below: {{{ if raw: instance = instance.__class__._default_manager.get(pk=instance.pk) }}} -- Ticket URL: <http://code.djangoproject.com/ticket/13299#comment:1> Django <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 django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.