Commit e9919b712e8cb5cb9ac74f92a8cd5f672cbbd139

Authored by Sergio Oliveira
1 parent cfca1fb8

Adding command to update message blocks

src/super_archives/management/commands/update_blocks.py 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +#!/usr/bin/env python
  2 +
  3 +from django.core.management.base import BaseCommand
  4 +from super_archives.models import Message
  5 +
  6 +
  7 +class Command(BaseCommand):
  8 + help = "Update message blocks (used to hide the reply part messages)"
  9 +
  10 + def handle(self, *args, **kwargs):
  11 + for message in Message.objects.iterator():
  12 + message.update_blocks()
... ...