                 if distr_keys.length-i <= new_num_shards-split_points.length # We don't add 1 because there is null
                     split_points.push key
                     continue
-                    
+
                 # Else we check if we have enough keys
                 if current_count >= rows_per_shard*split_points.length
                     split_points.push key


                $.ajax
                     processData: false
                     url: "/ajax/semilattice/#{@model.attributes.protocol}_namespaces/#{@model.get('id')}"
                     type: 'POST'
                     contentType: 'application/json'
                     data: JSON.stringify(data)

                error_msg = "The number of shards must be an integer."
                @display_msg error_msg
                return

            if new_num_shards < 1 or new_num_shards > MAX_SHARD_COUNT
                error_msg = "The number of shards must be beteen 1 and " + MAX_SHARD_COUNT + "."
                @display_msg error_msg
