mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-02 22:44:33 +02:00
Remove an attachment as preview image of an element, if it is not an image anymore through a change
This commit is contained in:
parent
08bd4d54e3
commit
dbff543fa8
2 changed files with 18 additions and 8 deletions
|
@ -75,7 +75,8 @@ class StructuralEntityChoiceHelper
|
|||
}
|
||||
|
||||
if ($choice instanceof HasMasterAttachmentInterface) {
|
||||
$tmp['data-image'] = $choice->getMasterPictureAttachment() instanceof Attachment ?
|
||||
$tmp['data-image'] = ($choice->getMasterPictureAttachment() instanceof Attachment
|
||||
&& $choice->getMasterPictureAttachment()->isPicture()) ?
|
||||
$this->attachmentURLGenerator->getThumbnailURL($choice->getMasterPictureAttachment(),
|
||||
'thumbnail_xs')
|
||||
: null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue