         .done()
 
   fetchAuctionArtworks: ->
-    console.log 'auction'
     Q.promise (resolve) =>
       if @artwork.related?.__typename is 'RelatedSale'
         sale = new Sale @artwork.related

    data = _.defaults options, defaults

  assignRail: (id, collection) ->
    console.log 'assignRail', id, collection.length >= @minCount, collection.length
    if collection.length >= @minCount
      @rails[id] = collection
      @excludedIds = @excludedIds.concat _.pluck(collection, '_id')

        resolve()

  fetchSimilarArtworks: ->
    @fetchFilterArtworks 'similar_artworks',
      gene_id: slugify(@artwork.category)
      artist_id: @artwork.artist.id
      size: 20

  fetchArtistArtworks: ->
    @fetchFilterArtworks 'artist_artworks',
      artist_id: @artwork.artist.id

  fetchPartnerArtworks: ->
    @fetchFilterArtworks 'partner_artworks',
      partner_id: @artwork.partner.id

  fetchFilterArtworks: (id, options)->
    Q.promise (resolve) =>
      artworks = new FilterArtworks []
      artworks.fetch
        data: @prepareParams options
        error: resolve
        success: (collection, response) =>
          @assignRail id, collection.toJSON()
          resolve()

  fetchArtwork: ->
    metaphysics
