Skip to content

Commit 4f9d4ca

Browse files
authored
Fix to remove a dataset from a space #349 (#373)
* Fix to remove a dataset from a space #349 Signed-off-by: Dipannita Dey <[email protected]>
1 parent 062beab commit 4f9d4ca

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88

99
## 1.21.0 - 2022-08-23
1010

11+
### Fixed
12+
- Fix to remove dataset from a space [#349](https://github.com/clowder-framework/clowder/issues/349)
13+
(The count might be off to existing spaces, please run fixCounts script)
14+
1115
### Added
1216
- MRI previewer for NIFTY (.nii) files.
1317

app/services/mongodb/MongoDBSpaceService.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ class MongoDBSpaceService @Inject() (
429429
datasets.get(dataset) match {
430430
case Some(x) => {
431431
val datasetBytes = datasets.getBytesForDataset(dataset)
432-
datasets.addToSpace(dataset, space)
433432
ProjectSpaceDAO.update(MongoDBObject("_id" -> new ObjectId(space.stringify)), $inc("spaceBytes" -> -1 * datasetBytes), upsert=false, multi=false, WriteConcern.Safe)
434433
ProjectSpaceDAO.update(MongoDBObject("_id" -> new ObjectId(space.stringify)), $inc("fileCount" -> -1 * x.files.length), upsert=false, multi=false, WriteConcern.Safe)
435434
ProjectSpaceDAO.update(MongoDBObject("_id" -> new ObjectId(space.stringify)), $inc("datasetCount" -> -1), upsert=false, multi=false, WriteConcern.Safe)

0 commit comments

Comments
 (0)