Began testing and fleshing out the NoteHandler.

This commit is contained in:
David Snopek
2013-07-22 23:48:06 +01:00
parent 0b7628f5e4
commit 28ad457773
2 changed files with 38 additions and 2 deletions

View File

@@ -487,10 +487,21 @@ class NoteHandler(RestHandlerBase):
def _serialize(note):
d = {
'id': note.id,
'guid': note.guid,
'model': note.model(),
'tags': ' '.join(note.tags),
'mid': note.mid,
'mod': note.mod,
'scm': note.scm,
'tags': note.tags,
'string_tags': ' '.join(note.tags),
'fields': {},
'flags': note.flags,
'usn': note.usn,
}
# TODO: do more stuff!
# add all the fields
for name, value in note.items():
d['fields'][name] = value
return d