Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nasa/openmct.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Mazzella <ozyx@users.noreply.github.com>2022-11-10 19:40:09 +0300
committerGitHub <noreply@github.com>2022-11-10 19:40:09 +0300
commite8ee5b3fc9b7fabfddffd2f41c39ec6f1cc65fcf (patch)
treeb89ba42cccd502704d0fe30f39a375f611bd16ab
parent393cb9767f4a6e81eb758f888860d5ec96e19e2d (diff)
fix test flake: calculate persisted time last (#5923)
* fix: calculate persisted time last
-rw-r--r--src/api/objects/ObjectAPI.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/api/objects/ObjectAPI.js b/src/api/objects/ObjectAPI.js
index 986644350..fc4cc1a8c 100644
--- a/src/api/objects/ObjectAPI.js
+++ b/src/api/objects/ObjectAPI.js
@@ -377,11 +377,13 @@ export default class ObjectAPI {
this.#mutate(domainObject, 'modifiedBy', username);
if (isNewObject) {
- const persistedTime = Date.now();
+ this.#mutate(domainObject, 'createdBy', username);
+
+ const createdTime = Date.now();
+ this.#mutate(domainObject, 'created', createdTime);
+ const persistedTime = Date.now();
this.#mutate(domainObject, 'persisted', persistedTime);
- this.#mutate(domainObject, 'created', persistedTime);
- this.#mutate(domainObject, 'createdBy', username);
savedObjectPromise = provider.create(domainObject);
} else {