Can't set Approved status of media from Velocity script

Former Member
Former Member

I am trying to set media to approved after updating the media in a moderated forum, but the code is not working. Here's the code:

		#if (!$media.IsApproved)
            #set($mediaResponse = $core_v2_media.Update($galleryId, $mediaId, "%{ IsApproved = true }"))
        #end

...or is this a permissions issue, in which case I would need to use an automation as in the one in this post?

Parents Reply
  • Former Member
    0 Former Member in reply to Former Member

    Neither of the following commands seems to work from a Velocity script or from a manual automation running under the service account. This applies to a moderated gallery.

    #set($mediaResponse = $core_v2_media.Update($galleryId, $mediaId, "%{ IsApproved = true }"))

    and

    #set($mediaResponse = $core_v2_media.Update($galleryId, $mediaId, "%{ IsApproved = 'true' }"))

Children