From a2ea7775a3d2e42f07f26e1a0b533e3d53cb4115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Trebec?= Date: Sun, 17 Sep 2006 09:19:50 +0000 Subject: [PATCH] [full-history] * Fixed 'signal_name' error # Somehow this modification got run over by trunk merge. # I'm trying to find a better solution, but for now this will do. # Thanks to David Cramer for error report. git-svn-id: http://code.djangoproject.com/svn/django/branches/full-history@3766 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/base.py | 2 +- django/db/models/query.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index bdae7eccc2..c9e9206321 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -160,7 +160,7 @@ class Model(object): _prepare = classmethod(_prepare) def save(self): - dispatcher.send(signal=signals.pre_save, sender=self.__class__, instance=self) + dispatcher.send(signal=signals.pre_save, sender=self.__class__, instance=self, signal_name="pre_save") non_pks = [f for f in self._meta.fields if not f.primary_key] cursor = connection.cursor() diff --git a/django/db/models/query.py b/django/db/models/query.py index 0b85c3f515..4ea3c6b0b0 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -921,7 +921,7 @@ def delete_objects(seen_objs): # Pre notify all instances to be deleted for pk_val, instance in seen_objs[cls]: - dispatcher.send(signal=signals.pre_delete, sender=cls, instance=instance) + dispatcher.send(signal=signals.pre_delete, sender=cls, instance=instance, signal_name="pre_delete") pk_list = [pk for pk,instance in seen_objs[cls]] for related in cls._meta.get_all_related_many_to_many_objects():