mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed exception during data fixtures loading.
This commit is contained in:
parent
eb071b1780
commit
46772c4ef3
1 changed files with 5 additions and 0 deletions
|
@ -61,6 +61,11 @@ class EventLogger
|
||||||
$repo = $this->em->getRepository(User::class);
|
$repo = $this->em->getRepository(User::class);
|
||||||
$user = $repo->getAnonymousUser();
|
$user = $repo->getAnonymousUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//If no anonymous user is available skip the log (needed for data fixtures)
|
||||||
|
if (null === $user) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$logEntry->setUser($user);
|
$logEntry->setUser($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue