Improve allowed running records (#528)

This commit is contained in:
Kevin Papst
2019-01-29 20:45:04 +01:00
committed by GitHub
parent fe4c3c10d6
commit 974806d145
4 changed files with 14 additions and 8 deletions

View File

@@ -172,7 +172,9 @@ trait TimesheetControllerTrait
$entityManager = $this->getDoctrine()->getManager();
try {
$this->stopActiveEntries($entry->getUser());
if (null === $entry->getEnd()) {
$this->stopActiveEntries($entry->getUser());
}
$entityManager->persist($entry);
$entityManager->flush();