   @fetchData: (slug, callback) ->
     return callback new Error 'slug is required' unless slug
 
-    @one { slug }, (err, data) ->
+    JGroupData.one { slug }, (err, data) ->
       return callback err  if err
       return callback null, data if data
 

{ secure, signature, Base, JsPath:{ getAt } } = require 'bongo'

module.exports = class JGroupData extends Base
  JPermissionSet = require './permissionset'
  { permit }     = JPermissionSet


    # handle $set and $unset cases in one
    operation  = { $set: {}, $unset: {} }
    for item in whitelist
      key = "payload.#{item}"
      if data[item]?
      then operation.$set[key]   = data[item]
      else operation.$unset[key] = data[item]
