I am a begener of pylons . now I use it to develope a website.
when i add a object to database, there is an error occured.

the error is this.
<type 'exceptions.UnboundLocalError'>: local variable 'wh_chapter_sort' 
referenced before assignment 

this is my add object method:

    class Ma003Controller(BaseController):

        def add(self):
            systemtime=h.getSystemTime()
            userid=session['USER_KEY'].wh_userid

            wh_chapter_sort = wh_chapter_sort.WHChapterSort(wh_userid=userid,
                                       wh_chapter_sortid='001',
                                       
wh_chapter_sortname=request.params['chaperSortName'],
                                       del_flg='0',
                                       update_time=systemtime,
                                       login_time=systemtime
                                       )
            meta.Session.add(wh_chapter_sort)
            meta.Session.commit()
        
            return redirect_to('/ma003')

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to