   { uniq }           = require 'underscore'
   { permit }         = require './group/permissionset'
   Validators         = require './group/validators'
-  { PROVIDERS }      = require './computeproviders/computeutils'
-
+
+  { PROVIDERS, reviveGroupPlan } = require './computeproviders/computeutils'
 
   @trait __dirname, '../traits/protected'
 

      delete data.baseStackId
      delete data.stackRevision

      JGroup = require './group'

      JGroup.one { slug: data.groupSlug }, (err, group) ->
        return callback err  if err or not group

        updateGroupResourceUsage data, group, 'increment', (err) ->

    return selector


  @fetchGroup = (slug, callback) ->

    JGroup = require './group'
    JGroup.one { slug }, (err, group) ->
      reviveGroupPlan group, callback


  fetchGroup: (callback) ->

    JComputeStack.fetchGroup @getAt('group'), callback


  @some$ = permit 'list stacks',
