ObjectsTable: add branchUuid, fail-safe

This commit is contained in:
Thomas Gelf 2021-08-23 09:00:26 +02:00
parent 6ff5b0c8d7
commit 290e34a8ca
1 changed files with 8 additions and 0 deletions

View File

@ -185,6 +185,10 @@ class ObjectsTable extends ZfQueryBasedTable
protected function getRowClasses($row)
{
// TODO: remove isset, to figure out where it is missing
if (isset($row->branch_uuid) && $row->branch_uuid !== null) {
return ['branch_modified'];
}
return [];
}
@ -269,6 +273,10 @@ class ObjectsTable extends ZfQueryBasedTable
protected function prepareQuery()
{
$table = $this->getDummyObject()->getTableName();
if ($this->branchUuid) {
$this->columns['branch_uuid'] = 'bo.branch_uuid';
}
$columns = $this->getColumns();
if ($this->branchUuid) {
$columns = $this->branchifyColumns($columns);