fix migration for MySQL (#430)

This commit is contained in:
Kevin Papst
2018-11-19 15:24:00 +01:00
committed by GitHub
parent 40322c6de4
commit 67dc1c7640
5 changed files with 94 additions and 18 deletions

View File

@@ -376,21 +376,21 @@ class Timesheet
->addViolation();
}
if ($activity->getVisible() === false) {
if (null === $this->getEnd() && $activity->getVisible() === false) {
$context->buildViolation('Cannot start a disabled activity.')
->atPath('activity')
->setTranslationDomain('validators')
->addViolation();
}
if ($project->getVisible() === false) {
if (null === $this->getEnd() && $project->getVisible() === false) {
$context->buildViolation('Cannot start a disabled project.')
->atPath('project')
->setTranslationDomain('validators')
->addViolation();
}
if ($project->getCustomer()->getVisible() === false) {
if (null === $this->getEnd() && $project->getCustomer()->getVisible() === false) {
$context->buildViolation('Cannot start a disabled customer.')
->atPath('customer')
->setTranslationDomain('validators')