summaryrefslogtreecommitdiffstats
path: root/askbot/models/__init__.py
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-05-02 00:07:06 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-05-02 00:07:06 -0400
commit2c7ef628f6632c9f395d5ef3933a5b6b84430947 (patch)
tree42aa753914df914c92c5a947b3a7a9d5f7678d04 /askbot/models/__init__.py
parenta0e24ca83fbadd5f4d7a065f76f0df8f638ac7b4 (diff)
downloadaskbot-2c7ef628f6632c9f395d5ef3933a5b6b84430947.tar.gz
askbot-2c7ef628f6632c9f395d5ef3933a5b6b84430947.tar.bz2
askbot-2c7ef628f6632c9f395d5ef3933a5b6b84430947.zip
added option to auto-follow asked question
Diffstat (limited to 'askbot/models/__init__.py')
-rw-r--r--askbot/models/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index cb6ccbef..a1a8f636 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -1734,6 +1734,10 @@ def user_post_question(
raise ValueError('question.author != self')
question.author = self # HACK: Some tests require that question.author IS exactly the same object as self-user (kind of identity map which Django doesn't provide),
# because they set some attributes for that instance and expect them to be changed also for question.author
+
+ if askbot_settings.AUTO_FOLLOW_QUESTION_BY_OP:
+ self.toggle_favorite_question(question)
+
return question
@auto_now_timestamp