From e85d0abda10db36becbe926ce68147a8417e58c3 Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Tue, 11 Mar 2014 16:19:59 -0400 Subject: [PATCH] Little polish --- .../apps/notes/management/commands/populate_filepicker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/karmaworld/apps/notes/management/commands/populate_filepicker.py b/karmaworld/apps/notes/management/commands/populate_filepicker.py index dcf556c..85ec805 100644 --- a/karmaworld/apps/notes/management/commands/populate_filepicker.py +++ b/karmaworld/apps/notes/management/commands/populate_filepicker.py @@ -22,7 +22,7 @@ class Command(BaseCommand): """ def handle(self, *args, **kwargs): - for note in Note.objects.iterator(): + for note in Note.objects.filter(fp_file='').iterator(): if note.fp_file.name: print "Skipping {0}".format(str(note)) continue @@ -76,4 +76,4 @@ class Command(BaseCommand): note.save() - + print "Successfully fixed {0}".format(str(note)) -- 2.25.1