Commit cf0c9fb8 authored by nanahira's avatar nanahira

fix

parent 6fde477b
Pipeline #9716 passed with stages
in 1 minute and 21 seconds
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
Repository, Repository,
SelectQueryBuilder, SelectQueryBuilder,
UpdateResult, UpdateResult,
DeepPartial,
} from 'typeorm'; } from 'typeorm';
import { import {
BlankReturnMessageDto, BlankReturnMessageDto,
...@@ -69,7 +70,7 @@ export class CrudBase< ...@@ -69,7 +70,7 @@ export class CrudBase<
await beforeCreate(repo); await beforeCreate(repo);
} }
try { try {
return await repo.save(ents); return await repo.save(ents as DeepPartial<T>[]);
} catch (e) { } catch (e) {
this.error( this.error(
`Failed to create entity ${JSON.stringify(ents)}: ${e.toString()}`, `Failed to create entity ${JSON.stringify(ents)}: ${e.toString()}`,
...@@ -104,7 +105,7 @@ export class CrudBase< ...@@ -104,7 +105,7 @@ export class CrudBase<
await beforeCreate(repo); await beforeCreate(repo);
} }
try { try {
return await repo.save(ent); return await repo.save(ent as DeepPartial<T>);
} catch (e) { } catch (e) {
this.error( this.error(
`Failed to create entity ${JSON.stringify(ent)}: ${e.toString()}`, `Failed to create entity ${JSON.stringify(ent)}: ${e.toString()}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment