[snowy: 13/26] Fix boolean values in JSON responses when using mysql (bug #612650)



commit cb7d5d644a15a178a877758b7dabde7dfb13b976
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date:   Wed Mar 24 10:41:51 2010 -0700

    Fix boolean values in JSON responses when using mysql (bug #612650)

 api/handlers.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/api/handlers.py b/api/handlers.py
index 5a6d229..90ef63f 100644
--- a/api/handlers.py
+++ b/api/handlers.py
@@ -214,8 +214,8 @@ def describe_note(note):
         'last-change-date': local_iso(note.user_modified),
         'last-metadata-change-date': local_iso(note.modified),
         'create-date': local_iso(note.created),
-        'open-on-startup': note.open_on_startup,
-        'pinned': note.pinned,
+        'open-on-startup': note.open_on_startup == True,
+        'pinned': note.pinned == True,
         'last-sync-revision': note.last_sync_rev,
         'tags': [t.name for t in note.tags.all()],
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]