Hello!
I'm hitting a weird problem. I have the following classes
class Container(SQLObject):
name = UnicodeCol(length=40, alternateID=True)
tests = MultipleJoin('Test')
class Test(SQLObject):
name = UnicodeCol(length=40, alternateID=True)
datafile = ForeignKey('DataFile')
container = ForeignKey('Container')
...
and a method:
@expose()
@validate(form=bm_form)
@error_handler(post)
@identity.require(identity.not_anonymous())
def save(self, id, name, datafile):
user = identity.current.user;
try:
test = Test.get(id)
except SQLObjectNotFound:
print "error"
...
if testdef.name != name:
testdef.name = name
print "New Name is %s" % testdef.name
After I call "save" and successfully change the an existing object's
name, I display a page listing all the tests in the container, and I
also double check with CatWalk and everything looks fine in the DB
(notrans_sqlite), the test name has changed to the new name.
However, if I keep reloading the page, once every few times the name
changes back to the old one! Trying to retrieve the object by its name
from another method fails, it does not exist in the DB. Even CatWalk
does not show the old name... is it some caching error in CherryPy?
How would you debug this if you were a beginner TG user like me?
Thanks in advance for your help.
JM
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---