Skip to content

Better handle non-existent fields in reports #5

@matiasgarciaisaia

Description

@matiasgarciaisaia

If a field used in any report gets renamed or disappears from the schema, NNDD crashes with a JavaScript error and one can't even delete that report.

A little error handling would be nice for being able to at least delete the report or show the content that don't needs that field.

screen shot 2015-01-22 at 4 19 57 pm

angular.js:10126 TypeError: Cannot read property 'type' of undefined
    at Object.service.deserialize (http://localhost:9000/scripts/services/filters_service.js:13:40)
    at http://localhost:9000/scripts/services/local_reports_service.js:94:33
    at Function.map (http://localhost:9000/bower_components/lodash/dist/lodash.compat.js:3856:27)
    at Object.service.deserialize (http://localhost:9000/scripts/services/local_reports_service.js:93:26)
    at http://localhost:9000/scripts/controllers/report_ctrl.js:72:33
    at deferred.promise.then.wrappedCallback (http://localhost:9000/bower_components/angular/angular.js:11682:81)
    at http://localhost:9000/bower_components/angular/angular.js:11768:26
    at Scope.$get.Scope.$eval (http://localhost:9000/bower_components/angular/angular.js:12811:28)
    at Scope.$get.Scope.$digest (http://localhost:9000/bower_components/angular/angular.js:12623:31)
    at Scope.$get.Scope.$apply (http://localhost:9000/bower_components/angular/angular.js:12915:24)angular.js:10126 (anonymous function)angular.js:7398 $getangular.js:11685 deferred.promise.then.wrappedCallbackangular.js:11768 (anonymous function)angular.js:12811 $get.Scope.$evalangular.js:12623 $get.Scope.$digestangular.js:12915 $get.Scope.$applyangular.js:8450 doneangular.js:8664 completeRequestangular.js:8603 xhr.onreadystatechange

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions