populate_db: Fix naive datetime RuntimeWarning.

Fixes these warnings from populate_db:

/srv/zulip-py3-venv/lib/python3.6/site-packages/django/db/models/fields/__init__.py:1419: RuntimeWarning: DateTimeField Draft.last_edit_time received a naive datetime (2021-09-10 23:33:15.063608) while time zone support is active.
  RuntimeWarning)
/srv/zulip-py3-venv/lib/python3.6/site-packages/django/db/models/fields/__init__.py:1419: RuntimeWarning: DateTimeField Draft.last_edit_time received a naive datetime (2021-09-10 23:33:15.065517) while time zone support is active.
  RuntimeWarning)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-09-10 16:33:48 -07:00 committed by Tim Abbott
parent e5c1b8e614
commit 729f70142f
1 changed files with 2 additions and 2 deletions

View File

@ -478,14 +478,14 @@ class Command(BaseCommand):
recipient=None,
topic="Release Notes",
content="Release 4.0 will contain ...",
last_edit_time=datetime.now(),
last_edit_time=timezone_now(),
)
Draft.objects.create(
user_profile=iago,
recipient=None,
topic="Release Notes",
content="Release 4.0 will contain many new features such as ... ",
last_edit_time=datetime.now(),
last_edit_time=timezone_now(),
)
desdemona = get_user_by_delivery_email("desdemona@zulip.com", zulip_realm)