mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
refactor: inventory cost process
This commit is contained in:
@@ -23,7 +23,7 @@ export class AccountRepository extends TenantRepository {
|
||||
private readonly tenancyContext: TenancyContext,
|
||||
|
||||
@Inject(TENANCY_DB_CONNECTION)
|
||||
private readonly tenantDBKnex: Knex,
|
||||
private readonly tenantDBKnex: () => Knex,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
@@ -32,7 +32,7 @@ export class AccountRepository extends TenantRepository {
|
||||
* Gets the repository's model.
|
||||
*/
|
||||
get model(): typeof Account {
|
||||
return Account.bindKnex(this.tenantDBKnex);
|
||||
return Account.bindKnex(this.tenantDBKnex());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user