mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-27 01:13:27 +03: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 {
|
static createDoc2Doc<T extends Doc>(tx: TxCreateDoc<T>): T {
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||||
return {
|
return {
|
||||||
|
...tx.attributes,
|
||||||
_id: tx.objectId,
|
_id: tx.objectId,
|
||||||
_class: tx.objectClass,
|
_class: tx.objectClass,
|
||||||
space: tx.objectSpace,
|
space: tx.objectSpace,
|
||||||
modifiedBy: tx.modifiedBy,
|
modifiedBy: tx.modifiedBy,
|
||||||
modifiedOn: tx.modifiedOn,
|
modifiedOn: tx.modifiedOn
|
||||||
...tx.attributes
|
|
||||||
} as T
|
} as T
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ export class TxFactory {
|
|||||||
objectClass,
|
objectClass,
|
||||||
objectSpace,
|
objectSpace,
|
||||||
mixin,
|
mixin,
|
||||||
attributes: attributes
|
attributes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ describe('query', () => {
|
|||||||
const comment = result[0]
|
const comment = result[0]
|
||||||
if (comment !== undefined) {
|
if (comment !== undefined) {
|
||||||
if (attempt > 0) {
|
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)
|
resolve(null)
|
||||||
} else {
|
} else {
|
||||||
expect((comment as WithLookup<AttachedComment>).$lookup?.space).toBeUndefined()
|
expect((comment as WithLookup<AttachedComment>).$lookup?.space).toBeUndefined()
|
||||||
@ -433,7 +433,7 @@ describe('query', () => {
|
|||||||
const comment = result[0]
|
const comment = result[0]
|
||||||
if (comment !== undefined) {
|
if (comment !== undefined) {
|
||||||
if (attempt > 0) {
|
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)
|
resolve(null)
|
||||||
} else {
|
} else {
|
||||||
expect(((comment as WithLookup<AttachedComment>).$lookup?.attachedTo as WithLookup<AttachedComment>)?.$lookup?.space).toBeUndefined()
|
expect(((comment as WithLookup<AttachedComment>).$lookup?.attachedTo as WithLookup<AttachedComment>)?.$lookup?.space).toBeUndefined()
|
||||||
|
Loading…
Reference in New Issue
Block a user