Skip to content
Snippets Groups Projects
Commit 11a47cdd authored by Jared Hancock's avatar Jared Hancock Committed by Peter Rotich
Browse files

queue: Fix crash deleting a column

Also, avoid setting FLAG_INHERIT_COLUMNS for queues which do not inherit
from another queue.
parent b1a2696e
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,12 @@ class CustomQueue extends VerySimpleModel {
));
}
function __onload() {
// Ensure valid state
if ($this->hasFlag(self::FLAG_INHERIT_COLUMNS) || !$this->parent_id)
$this->clearFlag(self::FLAG_INHERIT_COLUMNS);
}
function getId() {
return $this->id;
}
......@@ -745,7 +751,7 @@ class CustomQueue extends VerySimpleModel {
// Re-sort the in-memory columns array
$this->columns->sort(function($c) { return $c->sort; });
}
else {
elseif ($this->parent) {
// No columns -- imply column inheritance
$this->setFlag(self::FLAG_INHERIT_COLUMNS);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment