log no-op operation and changed status

This commit is contained in:
AlanCoding 2018-09-21 15:23:02 -04:00
parent 0bb1b0ed45
commit 5900af726b
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -15,6 +15,8 @@ class Command(BaseCommand):
def handle(self, *args, **kwargs):
# Sanity check: Is there already an organization in the system?
if Organization.objects.count():
print('An organization is already in the system, exiting.')
print('(changed: False)')
return
# Create a default organization as the first superuser found.
@ -54,3 +56,4 @@ class Command(BaseCommand):
jt.credentials.add(c)
print('Default organization added.')
print('Demo Credential, Inventory, and Job Template added.')
print('(changed: True)')