     templateDetails = null
 
     # TODO Make this to support multiple credentials
-    credential      = @credentialStatus.credentials.first
+    credential      = @credentialStatus.credentialsData.first
 
     if 'yaml' is @editorView.getOption 'contentType'
       templateContent = (yamlToJson templateContent).content

      else @saveButton.disable()


  saveTemplate: (callback) ->

    {stackTemplate} = @getData()

    updateStackTemplate {
      template: templateContent, templateDetails
      credential, stackTemplate, title
    }, (err, stackTemplate) =>

      if not err and stackTemplate
        @setData { stackTemplate }
        @emit 'Reload'

      callback err, stackTemplate


  handleSetDefaultTemplate: ->

    { stackTemplate } = @getData()
