diff --git a/library/Director/Db/Branch/Branch.php b/library/Director/Db/Branch/Branch.php index 0c3cefbb..49ec8074 100644 --- a/library/Director/Db/Branch/Branch.php +++ b/library/Director/Db/Branch/Branch.php @@ -124,6 +124,13 @@ class Branch return $this->branchUuid !== null; } + public function assertBranch() + { + if ($this->isMain()) { + throw new RuntimeException('Branch expected, but working in main branch'); + } + } + /** * @return bool */