Revision ab38ac31 snf-cyclades-app/synnefo/ui/static/snf/js/neutron.js

b/snf-cyclades-app/synnefo/ui/static/snf/js/neutron.js
21 21
    
22 22
    // Neutron base model, extending existing synnefo model
23 23
    models.NetworkModel = snfmodels.Model.extend({
24
      api_type: 'network'
24
      api_type: 'network',
25
      toJSON: function() {
26
        var res = {};
27
        _.each(this.attributes, function(attr, key) {
28
          if (attr instanceof bb.Collection) {
29
            attr = "[Collection object]";
30
          }
31
          res[key] = attr;
32
        });
33
        return res;
34
      }
25 35
    });
26 36
    
27 37
    // Neutron base collection, common neutron collection params are shared

Also available in: Unified diff