Forum Home
Welcome to the new pyForum.org.
A message board system written in pure python using the web2py framework.
pyForum is sporting a new, completely re-designed interface and back-end
Download pyForum from https://bitbucket.org/speedbird/pyforum
category problem -- Steps to reproduce
By: Subscriber_eleventy
Rank: Starfleet Ensign
Postings: 4
From: Shoulder Of Orion
Posted: Mon, 26 November, 2012 - 03:57 PM

Fresh install of web2py and pyforum.

1. Create a new category
2. Set it to viewable by Public
3. Now add a forum

The problem is line 230 in zadmin.py:
if (selected_category):


error is "object of type 'Row' has no len()"


cat_visible_to

in the table

zf_forum_category

is empty but that is a required column (or field)
By: Subscriber_eleventy
Rank: Starfleet Ensign
Postings: 4
From: Shoulder Of Orion
Posted: Mon, 26 November, 2012 - 04:36 PM

Actually line 230 is if len(selected_category).
I tried it without the len().
By: speedbird_admin
Rank: Starfleet Lieutenant
Postings: 79
From: Camas, Washington
Posted: Mon, 26 November, 2012 - 04:44 PM

Good catch, I will remove the redundant and potentially not needed len() in the next release.
By: user_272
Rank: Starfleet Ensign
Postings: 1
From: Unknown
Posted: Sat, 28 June, 2014 - 03:40 AM

I fixed it by doing this:

if isinstance(selected_category, list) and len(selected_category):
# Ok, a category has been selected, grab the category's forums
cat_forums = db(db.zf_forum.cat_id==selected_cat_id).select(
db.zf_forum.ALL, orderby=db.zf_forum.forum_sort)


From: speedbird_admin

Good catch, I will remove the redundant and potentially not needed len() in the next release.
Welcome
System Announcements
Latest Posts
Support pyForum