       authorise_api_reponse = ""
       dataFetcher("/api/users/authorise_api?token=" + spree_api_key).then (data) ->
         authorise_api_reponse = data
-        $scope.spree_api_key_ok = data.hasOwnProperty("success") and data["success"] is "Use of API Authorised"
+        $scope.spree_api_key_ok = data.hasOwnProperty("success") and data["success"] == "Use of API Authorised"
         if $scope.spree_api_key_ok
           $http.defaults.headers.common["X-Spree-Token"] = spree_api_key
           dataFetcher("/api/enterprises/managed?template=bulk_index&q[is_primary_producer_eq]=true").then (data) ->

        if product.hasOwnProperty("price")
          filteredProduct.price = product.price
          hasUpdatableProperty = true
        if product.hasOwnProperty("on_hand") and filteredVariants.length is 0 #only update if no variants present
          filteredProduct.on_hand = product.on_hand
          hasUpdatableProperty = true
        if product.hasOwnProperty("available_on")

        url: "/admin/products/bulk_update"
        data: productsToSubmit
      ).success((data) ->
        if angular.toJson($scope.products) == angular.toJson(data)
          $scope.resetProducts data
          $scope.displaySuccess()
        else
