enewe101 / digidemo

digital democracy engine
1 stars 0 forks source link

Posting a new discussion doesn't #41

Closed enewe101 closed 9 years ago

enewe101 commented 9 years ago

This is a bug. Here's how to replicate it. Go to an issue. Click the edit / discuss tab. Now click on start a discussion (you need to be logged in). Now make a discussion and submit it. Bug: the discussion doesn't display in the list.

enewe101 commented 9 years ago

I tracked down the cause of this: At one time we were filtering the view for open and closed discussions. Discussions still have the is_open attribute, and the default is false. The view currently filters on open discussions, hence the new discussion isn't displayed.

Fix: made is_open default True in models.Discussion.

enewe101 commented 9 years ago

Fixed, and merged into master.

Awhile ago we had the idea to have open and closed discussions, kind of like open and closed github issues, but we aren't really making use of that currently in the app. The bug arose because the default setting for the is_open attribute of model.Discussion was set to False, and we filter on open discussions in the list view. Although we aren't supporting the closing of discussions right now, I think we should keep it in the model because it's harmless, and we may return to that notion.

related -- we need to add a test case covering this bug #42