fix: make sure services without a modelFactory override still return data
continuous-integration/drone/push Build is passing Details

Resolves F-850 and F-879
This commit is contained in:
kolaente 2022-10-23 12:56:44 +02:00
parent 5d038dc79f
commit 8fdd3e785d
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 2 deletions

View File

@ -182,11 +182,11 @@ export default abstract class AbstractService<Model extends IAbstract = IAbstrac
////////////////
/**
* The modelFactory returns an model from an object.
* The modelFactory returns a model from an object.
* This one here is the default one, usually the service definitions for a model will override this.
*/
modelFactory(data : Partial<Model>) {
return new AbstractModel(data)
return data as Model
}
/**