Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Filter select,auxiliary and type autoview vars by coid when needed.
Ioannis committed May 3, 2024
1 parent 42897a0 commit 5b66e8c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/Controller/StandardController.php
@@ -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'])) {

0 comments on commit 5b66e8c

Please sign in to comment.