Commit d33b5634 authored by davelopez's avatar davelopez
Browse files

Simulate errored datasets when collection population fails

This is a temporal hack for the legacy history panel. It needs to be correctly handled in the new history.
parent 1b36d16f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -252,6 +252,15 @@ var DatasetCollection = Backbone.Model.extend(BASE_MVC.LoggableMixin)
                    _.extend(element, {
                        parent_hdca_id: parentHdcaId,
                    });

                    // Warning: MEGA-hack ahead...
                    if (!element.element_type && !element.object) {
                        // The DCE has to be in error state... so we simulate it
                        _.extend(element, {
                            element_type: "hda",
                            object: { state: "error" },
                        });
                    }
                });
                this.elements = new collectionClass(elements);
                //this.debug( 'collectionClass:', this.collectionClass + '', this.elements );