summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-12-08 13:52:53 -0600
committerDan McGee <dan@archlinux.org>2011-12-08 13:52:53 -0600
commita2317295bb4b8c52a83c9a70263fcc9cc73621f4 (patch)
tree6ee17ab320ca8e207090ae32820b2a496f5c5872 /packages
parent96fecb1079a1ad4a2b574616bc6611678fa53dc8 (diff)
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 <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/models.py11
1 files changed, 1 insertions, 10 deletions
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 Replacement(models.Model):
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")