Skip to content

Fix naive datetime runtime error

Ghost User requested to merge minimiseregistrations-runtimeerror into master

Short description

When running the minimiseregistrations command, the following error is thrown:

/usr/local/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1363: RuntimeWarning: DateTimeField Entry.updated_at received a naive datetime (2019-04-25 00:00:00) while time zone support is active.
  RuntimeWarning)

Using a timezone object instead of a datetime object fixes this.

Merge request reports

Loading