[Jifty-commit] jifty branch, jifty_client, updated. 116dd63f84f2b2d8c664d234cd3b26e994eb45f1
Jifty commits
jifty-commit at lists.jifty.org
Mon May 3 05:23:51 EDT 2010
The branch, jifty_client has been updated
via 116dd63f84f2b2d8c664d234cd3b26e994eb45f1 (commit)
from 684be8c532c9153c6c5b846b3a6c6be74d52d270 (commit)
Summary of changes:
share/web/static/js/jifty_client.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 116dd63f84f2b2d8c664d234cd3b26e994eb45f1
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon May 3 17:23:51 2010 +0800
Clear null values before calling Joose's constructor
diff --git a/share/web/static/js/jifty_client.js b/share/web/static/js/jifty_client.js
index fdba977..a7b85bd 100644
--- a/share/web/static/js/jifty_client.js
+++ b/share/web/static/js/jifty_client.js
@@ -135,6 +135,16 @@ Class("JiftyClient", {
},
inflateRecord: function (result, className) {
var c = this.meta.classNameToClassObject(className);
+
+ // Joose really doesn't like when you pass an explicit "null"
+ // for an attribute with a type constraint, so we need to clear
+ // those
+ Joose.O.eachSafe(result, function (value, field) {
+ if (value === null) {
+ delete result[field];
+ }
+ });
+
var record = c.meta.instantiate(result);
record._original = result;
return record;
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list