|
|
|
@ -250,13 +250,15 @@ export class MetaService {
|
|
|
|
|
const insertObj = { |
|
|
|
|
...data, |
|
|
|
|
...(ignoreIdGeneration ? {} : { id }), |
|
|
|
|
created_at: data?.created_at || this.knexConnection?.fn?.now(), |
|
|
|
|
updated_at: data?.updated_at || this.knexConnection?.fn?.now(), |
|
|
|
|
}; |
|
|
|
|
if (base_id !== null) insertObj.base_id = base_id; |
|
|
|
|
if (project_id !== null) insertObj.project_id = project_id; |
|
|
|
|
|
|
|
|
|
await this.knexConnection(target).insert(insertObj); |
|
|
|
|
await this.knexConnection(target).insert({ |
|
|
|
|
...insertObj, |
|
|
|
|
created_at: data?.created_at || this.knexConnection?.fn?.now(), |
|
|
|
|
updated_at: data?.updated_at || this.knexConnection?.fn?.now(), |
|
|
|
|
}); |
|
|
|
|
return insertObj; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|