diff options
-rw-r--r-- | askbot/skins/default/media/style/style.css | 2 | ||||
-rw-r--r-- | askbot/skins/default/media/style/style.less | 2 | ||||
-rw-r--r-- | askbot/views/writers.py | 7 |
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() |