This commit is contained in:
nikolark committed 2012-02-02 15:03:35 +01:00
1 parent bb218c1766
commit 8062041673
1 file changed
+2
+2
View File
@@ -16,5 +16,7 @@ setup_environ(settings)
from main.models import *
from radius.models import *
# Find expired userpass objects, format into a list
up_ids = UserPass.objects.filter(log__expires__lte=datetime.now()).values_list('radcheck_id', flat=True)
# then use the id's in an inner query to delete them
Radcheck.objects.filter(id__in=list(up_ids)).delete()