mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-03 06:54:34 +02:00
Do not throw an exception during rendering of log detail page, if element has no time travel URL
This commit is contained in:
parent
e68827bf3b
commit
efc152e3c8
3 changed files with 18 additions and 5 deletions
|
@ -106,7 +106,7 @@ class EntityURLGenerator
|
|||
/**
|
||||
* Gets the URL to view the given element at a given timestamp.
|
||||
*/
|
||||
public function timeTravelURL(AbstractDBElement $entity, DateTime $dateTime): string
|
||||
public function timeTravelURL(AbstractDBElement $entity, \DateTimeInterface $dateTime): string
|
||||
{
|
||||
$map = [
|
||||
Part::class => 'part_info',
|
||||
|
@ -161,7 +161,7 @@ class EntityURLGenerator
|
|||
}
|
||||
|
||||
//Otherwise throw an error
|
||||
throw new EntityNotSupportedException('The given entity is not supported yet!');
|
||||
throw new EntityNotSupportedException('The given entity is not supported yet! Passed class type: '.get_class($entity));
|
||||
}
|
||||
|
||||
public function viewURL(Attachment $entity): string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue