##// END OF EJS Templates
Invalidate signatures along with global ID content
neko259 -
r1565:72507874 default
parent child Browse files
Show More
@@ -12,9 +12,11 b' class Command(BaseCommand):'
12 @transaction.atomic
12 @transaction.atomic
13 def handle(self, *args, **options):
13 def handle(self, *args, **options):
14 count = 0
14 count = 0
15 for global_id in GlobalId.objects.all():
15 for global_id in GlobalId.objects.exclude(content__isnull=True).exclude(
16 content=''):
16 if global_id.is_local() and global_id.content is not None:
17 if global_id.is_local() and global_id.content is not None:
17 global_id.content = None
18 global_id.content = None
18 global_id.save()
19 global_id.save()
20 global_id.signature_set.all().delete()
19 count += 1
21 count += 1
20 print('Invalidated {} caches.'.format(count))
22 print('Invalidated {} caches.'.format(count))
General Comments 0
You need to be logged in to leave comments. Login now