def update_note(note, **kwargs):
    """
    Update a note
    """
    note_i = _get_note(note.id)

    if note.ref_key != note_i.ref_key:
        raise HydraError("Cannot convert a %s note to a %s note. Please create a new note instead."%(note_i.ref_key, note.ref_key))

    note_i.set_ref(note.ref_key, note.ref_id)

    note_i.value = note.value

    db.DBSession.flush()

    return note_i
def update_note ( note , ** kwargs ) : note_i = _get_note ( note . id ) if note . ref_key != note_i . ref_key : raise HydraError ( "Cannot convert a %s note to a %s note. Please create a new note instead." % ( note_i . ref_key , note . ref_key ) ) note_i . set_ref ( note . ref_key , note . ref_id ) note_i . value = note . value db . DBSession . flush ( ) return note_i
Update a note