fix(server): Fix UnlinkAttachment model reference bug
Add missing function invocation on LinkModel to properly call query method. The model reference was missing parentheses to invoke the factory function. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@ export class UnlinkAttachment {
|
|||||||
validateLinkModelExists(attachableModel);
|
validateLinkModelExists(attachableModel);
|
||||||
|
|
||||||
const LinkModel = this.moduleRef.get(modelRef, { strict: false });
|
const LinkModel = this.moduleRef.get(modelRef, { strict: false });
|
||||||
const foundLinkModel = await LinkModel.query(trx).findById(modelId);
|
const foundLinkModel = await LinkModel().query(trx).findById(modelId);
|
||||||
validateLinkModelEntryExists(foundLinkModel);
|
validateLinkModelEntryExists(foundLinkModel);
|
||||||
|
|
||||||
const document = await this.documentModel().query(trx).findOne('key', filekey);
|
const document = await this.documentModel().query(trx).findOne('key', filekey);
|
||||||
|
|||||||
Reference in New Issue
Block a user