mirror of
https://github.com/nasa/openmct.git
synced 2025-02-01 00:45:41 +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
|
* Persist any changes which have been made to this
|
||||||
* domain object's model.
|
* domain object's model.
|
||||||
@ -87,7 +92,7 @@ define(
|
|||||||
// ...and persist
|
// ...and persist
|
||||||
return persistenceFn.apply(persistenceService, [
|
return persistenceFn.apply(persistenceService, [
|
||||||
this.getSpace(),
|
this.getSpace(),
|
||||||
domainObject.getId(),
|
getKey(domainObject.getId()),
|
||||||
domainObject.getModel()
|
domainObject.getModel()
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user