Commits

Thomas Bohmbach, Jr.  committed bae2f2d

First stab at ndb support

  • Participants
  • Parent commits ee26409

Comments (0)

Files changed (1)

File restler/serializers.py

 
 from google.appengine.ext import blobstore
 from google.appengine.ext import db
-#from google.appengine.ext import ndb   #TODO: Uncomment and remove /lib/usr version when the official in the SDK
-import ndb
+try:
+    #from google.appengine.ext import ndb   #TODO: Uncomment and remove /lib/usr version when the official in the SDK
+    import ndb
+except:
+    ndb = db
 
 from google.appengine.api import users
 
 
 def get_properties(obj):
     try:
-        obj.properties()
+        return obj.properties()
     except AttributeError:
         return obj._properties