mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 23:39:51 +01:00
Show a useful message, when a master attachment is not valid because it is not a picture.
This commit is contained in:
@@ -121,7 +121,7 @@ class Part extends AttachmentContainingDBElement
|
||||
* @var Attachment
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\Attachments\Attachment")
|
||||
* @ORM\JoinColumn(name="id_master_picture_attachement", referencedColumnName="id")
|
||||
* @Assert\Expression("value == null or value.isPicture()")
|
||||
* @Assert\Expression("value == null or value.isPicture()", message="part.master_attachment.must_be_picture")
|
||||
* @ColumnSecurity(prefix="attachments", type="object")
|
||||
*/
|
||||
protected $master_picture_attachment;
|
||||
|
||||
Reference in New Issue
Block a user