mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-14 03:08:54 +01:00
Fixed exception during data fixtures loading.
This commit is contained in:
@@ -61,6 +61,11 @@ class EventLogger
|
||||
$repo = $this->em->getRepository(User::class);
|
||||
$user = $repo->getAnonymousUser();
|
||||
}
|
||||
|
||||
//If no anonymous user is available skip the log (needed for data fixtures)
|
||||
if (null === $user) {
|
||||
return false;
|
||||
}
|
||||
$logEntry->setUser($user);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user