mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
Also clear the Recipient table before populating the test database.
(imported from commit e87baf72a40f3c22a6710ce2d05881673fa052d7)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user