First time here? Check out the FAQ!
3

Can type of message be changed freely?

For example, user posted message as "answer" but I want to change its type to "comment" or even pick out some messages as questions.

I know I can change type of post in django-livesettings/posts but "comment -> answer" works fine and "answer -> comment" works only after I add another comment (possibly this can be cache issue).

EDIT: Works only on lastest posts. Cant explain this.

Transformation "answer/comment -> question" not works at all and drops error 500 each time.

Can this be possible?

Olloff's avatar
97
Olloff
asked 2012-04-23 23:21:07 -0600, updated 2012-04-23 23:44:30 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

The thread cache needs to be invalidated after any change like that.

Post type, post_object.post_type value can be changed within allowed limits, also value of post_object.parent needs to be updated when moving the post around.

We have the feature (repost X as Y) planned.

Evgeny's avatar
13.2k
Evgeny
answered 2012-04-24 07:23:49 -0600
edit flag offensive 0 remove flag delete link

Comments

Ehm, next question is how to invalidate thread cache manually? Does Askbot have existent function for that?

Olloff's avatar Olloff (2012-04-24 08:10:54 -0600) edit
1

Yes - thread_object.invalidate_cached_post_data(). Thread can be accessed from each post by post_object.thread

Evgeny's avatar Evgeny (2012-04-24 08:19:02 -0600) edit

Thank you, Evgeny!

Olloff's avatar Olloff (2012-04-24 08:43:12 -0600) edit
add a comment see more comments