From 1651a307c80a9494a4f99257dbb2b5fb121953cf Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 19 Jan 2024 16:08:58 -0500 Subject: [PATCH] #14872: Permit makemigrations --check without setting DEVELOPER=True --- netbox/core/management/commands/makemigrations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/core/management/commands/makemigrations.py b/netbox/core/management/commands/makemigrations.py index ce40bd3cc..afab5077d 100644 --- a/netbox/core/management/commands/makemigrations.py +++ b/netbox/core/management/commands/makemigrations.py @@ -9,9 +9,9 @@ class Command(_Command): """ This built-in management command enables the creation of new database schema migration files, which should never be required by and ordinary user. We prevent this command from executing unless the configuration - indicates that the user is a developer (i.e. configuration.DEVELOPER == True). + indicates that the user is a developer (i.e. configuration.DEVELOPER == True), or it was run with --check. """ - if not settings.DEVELOPER: + if not kwargs['check_changes'] and not settings.DEVELOPER: raise CommandError( "This command is available for development purposes only. It will\n" "NOT resolve any issues with missing or unapplied migrations. For assistance,\n"