Skip to content

Commit

Permalink
fix module update when already registered
Browse files Browse the repository at this point in the history
  • Loading branch information
Panthro committed Sep 12, 2016
1 parent 64f0d94 commit 9f2c3fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/orchestrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ class Orchestrator {

if (this.isRegistered(module)) {
logger.info(`Module ${module.name} already registered for uuid ${module.uuid}`);
return this.modulesCollection.update(module);
this.modulesCollection.removeWhere({ uuid: module.uuid });
return this.modulesCollection.insert(module);
}

// Only 1 persistence module allowed, the new one always replace the old one
Expand Down

0 comments on commit 9f2c3fb

Please sign in to comment.