django-static-precompiler icon indicating copy to clipboard operation
django-static-precompiler copied to clipboard

Using boolean in requires_system_checks is deprecated

Open henrythor opened this issue 2 years ago • 0 comments

As of Django 4.1, the management command system expects a list or tuple of required checks instead of a simple boolean.

See https://code.djangoproject.com/ticket/31546

Error looks like this:

Traceback (most recent call last):
  File "/srv/app/manage.py", line 18, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 279, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 49, in load_command_class
    return module.Command()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 274, in __init__
    raise TypeError("requires_system_checks must be a list or tuple.")
TypeError: requires_system_checks must be a list or tuple.

henrythor avatar Aug 12 '22 12:08 henrythor