From 7620f7fccd87a86f351dd754d85596ed5051131b Mon Sep 17 00:00:00 2001
From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 28 Jan 2010 15:13:28 +0000
Subject: [PATCH] do not promote a number widget's value to '0' when the value
 is null/isNaN.  that's equivalent to assuming the value is 37.  if the value
 needs to be zero, make it so, otherwise assume non-numeric values should
 translate to null.  will backport after checking for code that functions
 based on this assumption

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15395 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
index 4284e3c1a8..a9ea114d5d 100644
--- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
+++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
@@ -93,7 +93,7 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
                 case 'int':
                 case 'float':
                 case 'money':
-                    if(isNaN(value)) value = 0;
+                    if(isNaN(value)) value = null;
                 default:
                     return (value === '') ? null : value;
             }
-- 
2.11.0