-add test_view_2 with more sensible field names, for use by new TKO. this is intended to replace test_view, but I don't want to modify test_view until old TKO is phased out.
-ensure "loading" popup doesn't get closed too early, especially on initial load
-extend logic for RPC serialization for new TKO
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1916 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/rpc_utils.py b/frontend/afe/rpc_utils.py
index e0c2a6e..2773886 100644
--- a/frontend/afe/rpc_utils.py
+++ b/frontend/afe/rpc_utils.py
@@ -8,6 +8,9 @@
import datetime, xmlrpclib, threading
from frontend.afe import models, model_logic
+NULL_DATETIME = datetime.datetime.max
+NULL_DATE = datetime.date.max
+
def prepare_for_serialization(objects):
"""
Prepare Python objects to be returned via RPC.
@@ -34,6 +37,8 @@
isinstance(data, set)):
return [_prepare_data(item) for item in data]
elif isinstance(data, datetime.date):
+ if data is NULL_DATETIME or data is NULL_DATE:
+ return None
return str(data)
else:
return data