Skip to content

Commit 3f621bf

Browse files
committed
reverting data path // swc_uuid gets updated on swc row
1 parent 957153a commit 3f621bf

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

ingest/views.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,21 +1639,13 @@ def save_swc_sheet(swcs, sheet, saved_datasets):
16391639
neuronType = s['neuronType']
16401640
segmentTags = s['segmentTags']
16411641
proofreadingLevel = s['proofreadingLevel']
1642-
notes = s['notes']
1642+
notes = s['Notes']
16431643

16441644
swc = SWC(tracingFile=tracingFile, sourceData=sourceData, sourceDataSample=sourceDataSample, sourceDataSubmission=sourceDataSubmission, coordinates=coordinates, coordinatesRegistration=coordinatesRegistration, brainRegion=brainRegion, brainRegionAtlas=brainRegionAtlas, brainRegionAtlasName=brainRegionAtlasName, brainRegionAxonalProjection=brainRegionAxonalProjection, brainRegionDendriticProjection=brainRegionDendriticProjection, neuronType=neuronType, segmentTags=segmentTags, proofreadingLevel=proofreadingLevel, notes=notes, data_set_id=data_set_id,sheet_id=sheet.id)
1645-
swc_no_uuid = swc.save()
1646-
print('swc id: ' + swc_no_uuid.id)
1647-
1648-
1649-
swc_uuid = Mne.num_to_mne(swc_no_uuid.id)
1650-
1651-
print('swc_uuid: '+ swc_uuid)
1652-
1653-
this_swc = SWC.objects.get(id=swc_no_uuid.id)
1654-
# this_swc(swc_uuid=swc_uuid)
1655-
# this_swc.save()
1645+
swc.save()
16561646

1647+
swc_uuid = Mne.num_to_mne(swc.id)
1648+
swc = SWC.objects.filter(id=swc.id).update(swc_uuid=swc_uuid)
16571649
return True
16581650
except Exception as e:
16591651
print(repr(e))
@@ -2490,13 +2482,13 @@ def descriptive_metadata_upload(request):
24902482
associated_collection = form.cleaned_data['associated_collection']
24912483

24922484
# for production
2493-
#datapath = associated_collection.data_path.replace("/lz/","/etc/")
2485+
datapath = associated_collection.data_path.replace("/lz/","/etc/")
24942486

24952487
# for development on vm
24962488
# datapath = '/home/shared_bil_dev/testetc/'
24972489

24982490
# for development locally
2499-
datapath = '/Users/ecp/Desktop/bil_metadata_uploads'
2491+
# datapath = '/Users/ecp/Desktop/bil_metadata_uploads'
25002492

25012493
spreadsheet_file = request.FILES['spreadsheet_file']
25022494

0 commit comments

Comments
 (0)