Skip to content

Commit 3a87d67

Browse files
Claudehotlong
andauthored
Fix database-loader delete() to use correct driver signature
The driver.delete() method expects (object, id, options) but was being called with {object, where} which caused TypeScript error TS2345. Now correctly passes existing.id as the second parameter. Fixes: error TS2345: Argument of type '{ object: string; where: Record...' Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/c97d6820-b99b-498b-a344-69f22d7d3faf Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 200ef60 commit 3a87d67

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

packages/metadata/src/loaders/database-loader.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,8 @@ export class DatabaseLoader implements MetadataLoader {
608608
return;
609609
}
610610

611-
// Delete from the main metadata table
612-
await this.driver.delete(this.tableName, {
613-
object: this.tableName,
614-
where: this.baseFilter(type, name),
615-
});
611+
// Delete from the main metadata table using the record's ID
612+
await this.driver.delete(this.tableName, existing.id as string);
616613
}
617614
}
618615

0 commit comments

Comments
 (0)