summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-09-13 18:13:15 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-09-13 18:13:15 -0400
commit3e183e1a445ab46ddbf6f0a83be820fc77a8f0c3 (patch)
tree8ba2591d2235141a5ab4ea5d2485a8ce758ad604
parent9738bd55cf2e370659b3fed6a96b4bbd19b3b445 (diff)
parent68b7cbded84033b37da14d0d95516d5b522ef7d3 (diff)
downloadaskbot-3e183e1a445ab46ddbf6f0a83be820fc77a8f0c3.tar.gz
askbot-3e183e1a445ab46ddbf6f0a83be820fc77a8f0c3.tar.bz2
askbot-3e183e1a445ab46ddbf6f0a83be820fc77a8f0c3.zip
Merge branch 'adolfo' into user-groups
-rw-r--r--askbot/skins/default/media/style/style.css2
-rw-r--r--askbot/skins/default/media/style/style.less2
-rw-r--r--askbot/views/writers.py7
3 files changed, 10 insertions, 1 deletions
diff --git a/askbot/skins/default/media/style/style.css b/askbot/skins/default/media/style/style.css
index 752f0def..3abbd362 100644
--- a/askbot/skins/default/media/style/style.css
+++ b/askbot/skins/default/media/style/style.css
@@ -2100,6 +2100,7 @@ ul#related-tags li {
line-height: 18px;
margin-top: -2px;
margin-left: 4px;
+ box-shadow: none;
}
.question-page .post-controls .answer-convert input:hover,
.question-page .answer-controls .answer-convert input:hover {
@@ -2355,6 +2356,7 @@ ul#related-tags li {
line-height: 14px;
margin-left: 6px;
font-size: 13px;
+ box-shadow: none;
}
.question-page .comments .comment-body .convert-comment input:hover {
text-decoration: underline;
diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less
index 83fd4b9b..d898852e 100644
--- a/askbot/skins/default/media/style/style.less
+++ b/askbot/skins/default/media/style/style.less
@@ -2011,6 +2011,7 @@ ul#related-tags li {
line-height:18px;
margin-top:-2px;
margin-left:4px;
+ box-shadow: none;
}
.answer-convert input:hover{
@@ -2229,6 +2230,7 @@ ul#related-tags li {
line-height: 14px;
margin-left: 6px;
font-size: 13px;
+ box-shadow: none;
}
.convert-comment input:hover{
diff --git a/askbot/views/writers.py b/askbot/views/writers.py
index fbe76650..85a92d23 100644
--- a/askbot/views/writers.py
+++ b/askbot/views/writers.py
@@ -741,7 +741,12 @@ def comment_to_answer(request):
comment.parent.comment_count += 1
comment.parent.save()
- old_parent.comment_count -= 1
+ #to avoid db constraint error
+ if old_parent.comment_count >= 1:
+ old_parent.comment_count -= 1
+ else:
+ old_parent.comment_count = 0
+
old_parent.save()
comment.thread.invalidate_cached_data()