forked from DGNum/gestioCOF
Merge branch 'aureplop/cof_tests' into aureplop/cof-tests_registration
This commit is contained in:
commit
7bf2f73e72
1 changed files with 9 additions and 7 deletions
|
@ -63,6 +63,7 @@ class Command(BaseCommand):
|
||||||
except CustomMail.DoesNotExist:
|
except CustomMail.DoesNotExist:
|
||||||
mail = CustomMail.objects.create(**fields)
|
mail = CustomMail.objects.create(**fields)
|
||||||
status['synced'] += 1
|
status['synced'] += 1
|
||||||
|
if options['verbosity']:
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
'SYNCED {:s}'.format(fields['shortname']))
|
'SYNCED {:s}'.format(fields['shortname']))
|
||||||
assoc['mails'][obj['pk']] = mail
|
assoc['mails'][obj['pk']] = mail
|
||||||
|
@ -79,6 +80,7 @@ class Command(BaseCommand):
|
||||||
except Variable.DoesNotExist:
|
except Variable.DoesNotExist:
|
||||||
Variable.objects.create(**fields)
|
Variable.objects.create(**fields)
|
||||||
|
|
||||||
|
if options['verbosity']:
|
||||||
# C'est agréable d'avoir le résultat affiché
|
# C'est agréable d'avoir le résultat affiché
|
||||||
self.stdout.write(
|
self.stdout.write(
|
||||||
'{synced:d} mails synchronized {unchanged:d} unchanged'
|
'{synced:d} mails synchronized {unchanged:d} unchanged'
|
||||||
|
|
Loading…
Reference in a new issue