mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
fix: relations media links with models.
This commit is contained in:
@@ -103,6 +103,9 @@ export default class Expense extends TenantModel {
|
||||
},
|
||||
to: 'media.id',
|
||||
},
|
||||
filter(query) {
|
||||
query.where('model_name', 'Expense');
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@ export default class ManualJournal extends TenantModel {
|
||||
to: 'media_links.media_id',
|
||||
},
|
||||
to: 'media.id',
|
||||
},
|
||||
filter(query) {
|
||||
query.where('model_name', 'ManualJournal');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user