Put research parameters into correct fields
This commit is contained in:
parent
1b62922706
commit
2e7e25a529
2 changed files with 5 additions and 5 deletions
|
@ -119,14 +119,13 @@ def refresh_data(filename, fmt=None):
|
|||
|
||||
with transaction.atomic():
|
||||
research_methods = add_linked(person, Method, row['Methods'])
|
||||
person.research_methods = research_methods
|
||||
methods_people = [MethodsPeople.objects.get_or_create(method_id=m.id, person_id=person.id) for m in research_methods]
|
||||
research_scales = add_linked(person, Scale, row['Scale'])
|
||||
person.research_scales = research_scales
|
||||
scales_people = [ScalesPeople.objects.get_or_create(scale_id=s.id, person_id=person.id) for s in research_scales]
|
||||
research_taxa = add_linked(person, Taxon, row['Taxa'])
|
||||
person.research_taxa = research_taxa
|
||||
taxa_people = [TaxaPeople.objects.get_or_create(taxon_id=t.id, person_id=person.id) for t in research_taxa]
|
||||
research_fields = add_linked(person, Field, row['Field of expertise'])
|
||||
person.research_fields = research_fields
|
||||
|
||||
fields_people = [FieldsPeople.objects.get_or_create(field_id=f.id, person_id=person.id) for f in research_fields]
|
||||
person.index()
|
||||
person.save()
|
||||
count = count + 1
|
||||
|
|
|
@ -349,6 +349,7 @@ def get_progress(request):
|
|||
def generate():
|
||||
while 1:
|
||||
p = str(100*c_progress)
|
||||
print("progress = %s" % p)
|
||||
yield 'data: { "p":'+p+',"f":"'+c_filename+'"}\n\n'
|
||||
time.sleep(1.0)
|
||||
if c_filename == "":
|
||||
|
|
Loading…
Reference in a new issue