         existing = _.find(result.data.apprenticeships, (apprenticeship) ->
           apprenticeship.links.master.id == user.id and apprenticeship.links.apprentice.id == currentUser.id
         )
+        console.log existing
         if existing
           $scope.bowLabel = "Connected"
           $('#bow-button').removeAttr("data-toggle")


  defer.promise
    .then User.loadCurrentUser().then (result) ->
      $scope.currentUser = result
    .then User.loadOne(userId).then (result) ->
      $scope.user = result.users[0]
      showOrHideBow($scope.user, $scope.currentUser)

        $('#bow-modal').modal('hide')
        $scope.bowLabel = "Connected"
        $('#bow-button').removeAttr("data-toggle")

])

