From 7b40df9e8b385f618a91e34e83681e6d19c76670 Mon Sep 17 00:00:00 2001 From: Jessica McKellar Date: Tue, 28 Aug 2012 16:57:45 -0400 Subject: [PATCH] Also clear the Recipient table before populating the test database. (imported from commit e87baf72a40f3c22a6710ce2d05881673fa052d7) --- zephyr/management/commands/populate_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zephyr/management/commands/populate_db.py b/zephyr/management/commands/populate_db.py index 966da6b195..063bdb6b37 100644 --- a/zephyr/management/commands/populate_db.py +++ b/zephyr/management/commands/populate_db.py @@ -10,7 +10,7 @@ class Command(NoArgsCommand): help = "Populate a test database" def handle_noargs(self, **options): - for klass in [Zephyr, ZephyrClass, UserProfile, User]: + for klass in [Zephyr, ZephyrClass, UserProfile, User, Recipient]: klass.objects.all().delete() # Create test Users (UserProfiles are automatically created). @@ -50,4 +50,4 @@ class Command(NoArgsCommand): new_zephyr.pub_date = datetime.datetime.utcnow() new_zephyr.save() - self.stdout.write("Successfully populated test database.") + self.stdout.write("Successfully populated test database.\n")