Core media

You could try this instead of having a temporary variable:

    return command.execute(cmd.linkMedia, context, result.work, result.media).return(result.media)