Show a useful message, when a master attachment is not valid because it is not a picture.

This commit is contained in:
Jan Böhmer 2019-09-02 23:13:50 +02:00
parent e2b643c52b
commit b7b7bf3a8b

View file

@ -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;