From d1030bbbc229bef108b5947cd65957cdc2abe84c Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 15 Sep 2010 02:30:32 +0000 Subject: [PATCH] added useful exception that is typical w/ autofieldwidget when an IDL class is not defined git-svn-id: svn://svn.open-ils.org/ILS/trunk@17667 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js index d94fd4165..84bdb760d 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -358,6 +358,8 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { _getLinkSelector : function() { var linkClass = this.idlField['class']; if(this.idlField.reltype != 'has_a') return false; + if(!fieldmapper.IDL.fmclasses[linkClass]) // class neglected by AutoIDL + throw new Error("IDL Class '" + linkClass + "' not defined"); if(!fieldmapper.IDL.fmclasses[linkClass].permacrud) return false; if(!fieldmapper.IDL.fmclasses[linkClass].permacrud.retrieve) return false; -- 2.11.0