Skip to content

Commit

Permalink
Merge pull request COmanage#191 from Ioannis/CFM-393_Limit_MVEA_Type_…
Browse files Browse the repository at this point in the history
…field_to_Current_CO

CFM-393_Limit_MVEA_Type_field_to_Current_CO
  • Loading branch information
Ioannis authored May 3, 2024
2 parents 42897a0 + 5b66e8c commit 18f22e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,10 @@ protected function populateAutoViewVars(object $obj=null) {
case 'select':
$avvmodel = $avv['model'];
$this->$avvmodel = TableRegistry::getTableLocator()->get($avvmodel);
if($this->$avvmodel->getSchema()->hasColumn('co_id')) {
$avv['where']['co_id'] = $this->getCOID();
}

$query = $this->$avvmodel->find($avv['type'] == 'auxiliary' ? 'all' : 'list');

if(!empty($avv['find'])) {
Expand Down

0 comments on commit 18f22e4

Please sign in to comment.