mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 00:10:37 +00:00
1105 fix (#1207)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
667d22cb7a
commit
78b1d38340
@ -229,12 +229,12 @@ export abstract class TxProcessor implements WithTx {
|
||||
static createDoc2Doc<T extends Doc>(tx: TxCreateDoc<T>): T {
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
return {
|
||||
...tx.attributes,
|
||||
_id: tx.objectId,
|
||||
_class: tx.objectClass,
|
||||
space: tx.objectSpace,
|
||||
modifiedBy: tx.modifiedBy,
|
||||
modifiedOn: tx.modifiedOn,
|
||||
...tx.attributes
|
||||
modifiedOn: tx.modifiedOn
|
||||
} as T
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ export class TxFactory {
|
||||
objectClass,
|
||||
objectSpace,
|
||||
mixin,
|
||||
attributes: attributes
|
||||
attributes
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -386,7 +386,7 @@ describe('query', () => {
|
||||
const comment = result[0]
|
||||
if (comment !== undefined) {
|
||||
if (attempt > 0) {
|
||||
expect((comment as WithLookup<AttachedComment>).$lookup?.space).toEqual(futureSpace)
|
||||
expect((comment as WithLookup<AttachedComment>).$lookup?.space?._id).toEqual(futureSpace._id)
|
||||
resolve(null)
|
||||
} else {
|
||||
expect((comment as WithLookup<AttachedComment>).$lookup?.space).toBeUndefined()
|
||||
@ -433,7 +433,7 @@ describe('query', () => {
|
||||
const comment = result[0]
|
||||
if (comment !== undefined) {
|
||||
if (attempt > 0) {
|
||||
expect(((comment as WithLookup<AttachedComment>).$lookup?.attachedTo as WithLookup<AttachedComment>)?.$lookup?.space).toEqual(futureSpace)
|
||||
expect(((comment as WithLookup<AttachedComment>).$lookup?.attachedTo as WithLookup<AttachedComment>)?.$lookup?.space?._id).toEqual(futureSpace._id)
|
||||
resolve(null)
|
||||
} else {
|
||||
expect(((comment as WithLookup<AttachedComment>).$lookup?.attachedTo as WithLookup<AttachedComment>)?.$lookup?.space).toBeUndefined()
|
||||
|
Loading…
Reference in New Issue
Block a user