Commit c3436390 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

use iterator to reduce cache in migration

parent 62230a4e
Pipeline #54375 passed with stages
in 3 minutes and 29 seconds
......@@ -30,7 +30,7 @@ def link_to_source(apps, schema_editor):
'igc': Source.objects.get(name='IGC-9.9M'),
'virgo': Source.objects.get(name='Virgo')
}
for row in Gene.objects.all():
for row in Gene.objects.all().iterator():
if row.source != 'undef':
row.new_source = mapping_source.get(row.source)
row.save()
......
Markdown is supported
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