I think this:
1 def _get_sample_option(self):
2 if self.options:
3 if isinstance(self.options[0][1], list):
4 sample = self.options[0][1][0]
5 else:
6 sample = self.options[0]
7 return sample[0]
8 else:
9 return None
is the culpirt. I'm not super duper knowledgible about TurboGears yet,
but it looks like it digs into options without checking if it's
callable first. So, I'm guessing Alberto Valverde was right in pointing
out the validation guessing. But still, I got the same error as posted
above with or without specifiying validation. Perhaps it does not check
elsewhere, too.
Using turbogears.utils.request_available worked good, though:
def get_blogs():
if request_available():
return [(blog.id, blog.title)
for blog in
identity.current.identity().user.authorships]
Despite not being how it *should* work, it's fine for now and this
problem, thankfully, no longer has me stopped in my tracks.
-Sam
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---