GalleryFile now sets Album thumbnail if Album doesnt have one
This commit is contained in:
parent
d28c2dc854
commit
d2faf8cd23
3 changed files with 9 additions and 127 deletions
|
|
@ -577,6 +577,13 @@ sub processPropertiesFromFormPost {
|
|||
|
||||
### Passes all checks
|
||||
|
||||
# If the album doesn't yet have a thumbnail, make this File the thumbnail
|
||||
if ( !$self->getParent->get('assetIdThumbnail') ) {
|
||||
$self->getParent->update( {
|
||||
assetIdThumbnail => $self->getId,
|
||||
} );
|
||||
}
|
||||
|
||||
$self->requestAutoCommit;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue