Comment sqlite-only changes

This commit is contained in:
Ludovic Stephan 2020-11-21 19:17:45 +01:00
parent 3ad1de64f7
commit a5529c9333

View file

@ -73,15 +73,15 @@ class Command(BaseCommand):
# À décommenter pour utilisation locale (avec SQLite)
def _manual_ids(cls, to_create):
pid = getattr(cls.objects.order_by("-id").first(), "id", 1)
for p in to_create:
pid += 1
p.id = pid
# def _manual_ids(cls, to_create):
# pid = getattr(cls.objects.order_by("-id").first(), "id", 1)
# for p in to_create:
# pid += 1
# p.id = pid
_manual_ids(User, users_to_create)
_manual_ids(Profile, profiles_to_create)
_manual_ids(Profile.department.through, dept_m2m_to_create)
# _manual_ids(User, users_to_create)
# _manual_ids(Profile, profiles_to_create)
# _manual_ids(Profile.department.through, dept_m2m_to_create)
User.objects.bulk_create(users_to_create)
for profile in profiles_to_create: