[Zope-DB] python script calls zsql method need to compare values

Laura McCord Laura.McCord at doucet-austin.com
Thu Sep 16 11:38:41 EDT 2004


Hi,

 I am having a problem compraing the value that is returned by a zsql
method.
This is what I have so far:

status = context.view_activity(SystemNetName = SystemNetName)
if status == 'active':
 return '#000'
if status == 'inactive':
 return '#b7b7b7'
else:
 return status

Naturally, it is going to return status everytime because status is
equal
to <Shared.DC.ZRDB.Results.Results instance at 0xb2aa806c>

So, how to I compare it's actual value?

Thank You in Advance,
 Laura


More information about the Zope-DB mailing list