##// END OF EJS Templates
Check that parsed post has a signature of its author's key
Check that parsed post has a signature of its author's key

File last commit:

r1565:72507874 default
r1582:9e8b0925 default
Show More
invalidate_sync_cache.py
22 lines | 688 B | text/x-python | PythonLexer
/ boards / management / commands / invalidate_sync_cache.py
neko259
Added id-type attribute to attachments to specify a type of hash (currently only md5). Added management command to delete global id caches
r1560 from django.core.management import BaseCommand
from django.db import transaction
from boards.models import GlobalId
__author__ = 'neko259'
class Command(BaseCommand):
help = 'Removes local global ID cache'
@transaction.atomic
def handle(self, *args, **options):
count = 0
neko259
Invalidate signatures along with global ID content
r1565 for global_id in GlobalId.objects.exclude(content__isnull=True).exclude(
content=''):
neko259
Added id-type attribute to attachments to specify a type of hash (currently only md5). Added management command to delete global id caches
r1560 if global_id.is_local() and global_id.content is not None:
global_id.content = None
global_id.save()
neko259
Invalidate signatures along with global ID content
r1565 global_id.signature_set.all().delete()
neko259
Added id-type attribute to attachments to specify a type of hash (currently only md5). Added management command to delete global id caches
r1560 count += 1
print('Invalidated {} caches.'.format(count))