﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26961	Run admin checks if DEBUG is False	Adam Johnson	nobody	"In our CI system we run `call_command('check')` during tests and `manage.py check` before deployment. Two bugs crept through recently thanks to broken admin checks.

This is because the contrib.admin checks don't run unless `DEBUG = True`, which is not recommended for tests or production, so we never saw these checks break.

The commit that moved the checks from custom validation to the check framework hints at why this it was historically only when `DEBUG = True` at https://github.com/django/django/commit/4ad1eb1c14b629cf5bcfd253ed40e875f1bddd47#diff-57866af2aff590165ffe4967107424fdL69 :

> Don't import the humongous validation code unless required

This isn't valid reason with the check framework since all the code is imported anyway when assigning `checks_class` on `BaseModelAdmin`, the only memory now saved is that the list of failing checks isn't instantiated.

I'd argue the `DEBUG` requirement should be removed"	Cleanup/optimization	closed	contrib.admin	1.9	Normal	fixed	checks	me@…	Ready for checkin	1	0	0	0	0	0
