From a2317295bb4b8c52a83c9a70263fcc9cc73621f4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 8 Dec 2011 13:52:53 -0600 Subject: Remove auto-deletion of package relations on inactive users We have a page where these can all be managed now, so best leave it alone in case someone accidentally marks a user inactive and all the data is lost. Signed-off-by: Dan McGee --- packages/models.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'packages') diff --git a/packages/models.py b/packages/models.py index 0d02ab31..387db5c2 100644 --- a/packages/models.py +++ b/packages/models.py @@ -229,16 +229,7 @@ class Meta: ordering = ['name'] -def remove_inactive_maintainers(sender, instance, created, **kwargs): - # instance is an auth.models.User; we want to remove any existing - # maintainer relations if the user is no longer active - if not instance.is_active: - maint_relations = PackageRelation.objects.filter(user=instance, - type=PackageRelation.MAINTAINER) - maint_relations.delete() - -post_save.connect(remove_inactive_maintainers, sender=User, - dispatch_uid="packages.models") +# hook up some signals for sender in (PackageRelation, SignoffSpecification, Signoff): pre_save.connect(set_created_field, sender=sender, dispatch_uid="packages.models") -- cgit v1.2.3-54-g00ecf