Little polish
authorCharles Connell <charles@connells.org>
Tue, 11 Mar 2014 20:19:59 +0000 (16:19 -0400)
committerCharles Connell <charles@connells.org>
Tue, 11 Mar 2014 20:19:59 +0000 (16:19 -0400)
karmaworld/apps/notes/management/commands/populate_filepicker.py

index dcf556c11ff23866407a000f0ad8336d96fea1dc..85ec8058b20cd677ea21bb8d8f7d468af4146e97 100644 (file)
@@ -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))