mirror of
https://github.com/nasa/openmct.git
synced 2025-06-22 09:08:43 +00:00
fix test flake: calculate persisted time last (#5923)
* fix: calculate persisted time last
This commit is contained in:
@ -377,12 +377,14 @@ export default class ObjectAPI {
|
||||
this.#mutate(domainObject, 'modifiedBy', username);
|
||||
|
||||
if (isNewObject) {
|
||||
const persistedTime = Date.now();
|
||||
|
||||
this.#mutate(domainObject, 'persisted', persistedTime);
|
||||
this.#mutate(domainObject, 'created', persistedTime);
|
||||
this.#mutate(domainObject, 'createdBy', username);
|
||||
|
||||
const createdTime = Date.now();
|
||||
this.#mutate(domainObject, 'created', createdTime);
|
||||
|
||||
const persistedTime = Date.now();
|
||||
this.#mutate(domainObject, 'persisted', persistedTime);
|
||||
|
||||
savedObjectPromise = provider.create(domainObject);
|
||||
} else {
|
||||
const persistedTime = Date.now();
|
||||
|
Reference in New Issue
Block a user