Merge branch 'kerl/make_kfetloaddevdata_idempotent' into 'master'

Rend kfetloaddevdata idempotent

See merge request klub-dev-ens/gestioCOF!474
This commit is contained in:
Ludovic Stephan 2020-12-04 17:17:38 +01:00
commit 7324a72e6e

View file

@ -52,10 +52,12 @@ class Command(MyBaseCommand):
self.stdout.write("Création des comptes K-Fêt")
gaulois = CofProfile.objects.filter(user__last_name="Gaulois")
cof_profiles = CofProfile.objects.order_by("user__username")
gaulois = cof_profiles.filter(user__last_name="Gaulois")
gaulois_trigramme = map("{:03d}".format, range(50))
romains = CofProfile.objects.filter(user__last_name="Romain")
romains = cof_profiles.filter(user__last_name="Romain")
romains_trigramme = map(lambda x: str(100 + x), range(99))
created_accounts = 0