Skip to content

Commit

Permalink
finished reverting
Browse files Browse the repository at this point in the history
  • Loading branch information
porterbot committed Jan 29, 2024
1 parent 4fbf9f3 commit 1356033
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ allprojects {
apply plugin: 'idea'

group = 'org.janelia.jacs-model'
version = '2.81'
version = '2.82'
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public TmNeuronMetadata createTmNeuronInWorkspace(String subjectKey, TmNeuronMet
neuronMetadata.setLargeNeuron(true);
}
LOG.info("creating neuron");
persistedNeuronMetadata = createNeuronWithExistingId(neuronMetadata, collection, neuronOwnerKey);
persistedNeuronMetadata =
saveNeuron(neuronMetadata, workspace.getNeuronCollection(), subjectKey, false);
if (isLarge) {
saveLargeNeuronPointData(persistedNeuronMetadata.getId(), pointData);
}
Expand Down Expand Up @@ -294,25 +295,6 @@ public List<TmOperation> getOperations(Long workspaceId, Long neuronId, Date sta
return MongoDaoHelper.find(filter, null, 0, 10000, operationCollection, TmOperation.class);
}


private TmNeuronMetadata createNeuronWithExistingId(TmNeuronMetadata entity,
String collectionName, String subjectKey) {
MongoCollection<TmNeuronMetadata> mongoCollection = getNeuronCollection(collectionName);

Date now = new Date();
for (TmGeoAnnotation anno : entity.getRootAnnotations()) {
anno.setParentId(entity.getId());
}

entity.setOwnerKey(subjectKey);
entity.getReaders().add(subjectKey);
entity.getWriters().add(subjectKey);
entity.setCreationDate(now);
entity.setUpdatedDate(now);
mongoCollection.insertOne(entity);
return entity;
}

private TmNeuronMetadata saveNeuron(TmNeuronMetadata entity,
String collectionName, String subjectKey, boolean forceCreate) {
MongoCollection<TmNeuronMetadata> mongoCollection = getNeuronCollection(collectionName);
Expand Down

0 comments on commit 1356033

Please sign in to comment.