mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: resource advanced view filter.
This commit is contained in:
@@ -27,7 +27,6 @@ export default class ViewRole extends TenantModel {
|
||||
* Relationship mapping.
|
||||
*/
|
||||
static get relationMappings() {
|
||||
const ResourceField = require('models/ResourceField');
|
||||
const View = require('models/View');
|
||||
|
||||
return {
|
||||
@@ -42,18 +41,6 @@ export default class ViewRole extends TenantModel {
|
||||
to: 'views.id',
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* View role model may belongs to resource field model.
|
||||
*/
|
||||
field: {
|
||||
relation: Model.BelongsToOneRelation,
|
||||
modelClass: this.relationBindKnex(ResourceField.default),
|
||||
join: {
|
||||
from: 'view_roles.fieldId',
|
||||
to: 'resource_fields.id',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user