Fakultas Ilmu Komputer UI

Verified Commit 70a284be authored by Giovan Isa Musthofa's avatar Giovan Isa Musthofa
Browse files

[CHORES] Add more number of DaftarDonor on seed_agenda_donor

parent 56d1d62d
......@@ -27,15 +27,14 @@ class Command(BaseCommand):
) if options['users_email'] else list(User.objects.all())
list_daftar_donor = []
ada = {}
for jadwal_donor in list_jadwal_donor:
random.shuffle(list_user)
for i in range(rand_int(0, min(5, len(list_user)))):
jumlah_pendaftar = rand_int(0, len(list_user))
for i in range(jumlah_pendaftar):
user = list_user[i]
if DaftarDonor.objects.filter(user=user, jadwal_donor=jadwal_donor).count() > 0:
continue
sedang_hamil = rand_bool()
ada[(user.id, jadwal_donor.id)] = True
list_daftar_donor.append(
DaftarDonor(
user=user,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment