Commit a2d3b37e authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

Allow rehash for specific patches


Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent d075be0a
......@@ -20,9 +20,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from patchwork.models import Patch
import sys
if __name__ == '__main__':
for patch in Patch.objects.all():
if len(sys.argv) > 1:
patches = Patch.objects.filter(id__in = sys.argv[1:])
else:
patches = Patch.objects.all()
for patch in patches:
print patch.id, patch.name
patch.hash = None
patch.save()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment