Fix minor bugs with hanging protocols

This commit is contained in:
Evren Ozkan committed 2017-01-05 13:06:17 -05:00
1 parent 3f8350a79b
commit e3561690f1
2 files changed
+9 -49

No files matched your search

@@ -173,10 +173,6 @@ HP.Protocol = class Protocol {
/**
* Creates a clone of the current Protocol with a new name
*
* Note! This method absolutely cannot be renamed 'clone', because
* Minimongo's insert method uses 'clone' internally and this
* somehow causes very bizarre behaviour
*
* @param name
* @returns {Protocol|*}
*/
@@ -196,9 +192,6 @@ HP.Protocol = class Protocol {
clonedProtocol.name = name;
}
// Remove any MongoDB ID the current protocol may have had
delete clonedProtocol._id;
// Unlock the clone
clonedProtocol.locked = false;
@@ -206,36 +199,6 @@ HP.Protocol = class Protocol {
return clonedProtocol;
}
/**
* Add a Role to the Set of Roles that have access
* to this Protocol
*
* @param role
*/
addAvailableTo(role) {
// Add the role's MongoDB _id to the availableTo Set
this.availableTo.add(role._id);
// Update the modifiedDate and User that last
// modified this Protocol
this.protocolWasModified();
}
/**
* Add a Role to the Set of Roles that have access
* to this Protocol
*
* @param role
*/
addEditableBy(role) {
// Add the role's MongoDB _id to the editableBy Set
this.editableBy.add(role._id);
// Update the modifiedDate and User that last
// modified this Protocol
this.protocolWasModified();
}
/**
* Adds a Stage to this Protocol's display set sequence
*