Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
The instance tenant has an object called name. So, your code should basically be like this.tenants = Tenant.get(session) for t in tenants: print t if t.name == 'Production': print "TRUE"I hope this helps.