mirror of
https://github.com/nasa/openmct.git
synced 2025-01-20 03:36:44 +00:00
[Persistence] Parse out key
When an identifier is a space-key pair, parse out the key before persisting.
This commit is contained in:
parent
0a9c162f26
commit
d69cf6c6fe
@ -63,6 +63,11 @@ define(
|
||||
};
|
||||
}
|
||||
|
||||
function getKey(id) {
|
||||
var parts = id.split(":");
|
||||
return parts.length > 1 ? parts.slice(1).join(":") : id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Persist any changes which have been made to this
|
||||
* domain object's model.
|
||||
@ -87,7 +92,7 @@ define(
|
||||
// ...and persist
|
||||
return persistenceFn.apply(persistenceService, [
|
||||
this.getSpace(),
|
||||
domainObject.getId(),
|
||||
getKey(domainObject.getId()),
|
||||
domainObject.getModel()
|
||||
]);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user