fix: make sure services without a modelFactory override still return data

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 untrusted user: konrad
GPG Key ID: F40E70337AB24C9B

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. * This one here is the default one, usually the service definitions for a model will override this.
*/ */
modelFactory(data : Partial<Model>) { modelFactory(data : Partial<Model>) {
return new AbstractModel(data) return data as Model
} }
/** /**