##// END OF EJS Templates
Fixed getting sync text of broken reflinks. Reply posts when quoting them
Fixed getting sync text of broken reflinks. Reply posts when quoting them

File last commit:

r1565:72507874 default
r1575:92eec996 default
Show More
invalidate_sync_cache.py
22 lines | 688 B | text/x-python | PythonLexer
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
for global_id in GlobalId.objects.exclude(content__isnull=True).exclude(
content=''):
if global_id.is_local() and global_id.content is not None:
global_id.content = None
global_id.save()
global_id.signature_set.all().delete()
count += 1
print('Invalidated {} caches.'.format(count))