#NEWLINE# def restore( self ) : #NEWLINE# #INDENT# 'Restores a deleted post.' #NEWLINE# if ( not self . is_deleted ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if self . is_question : #NEWLINE# #INDENT# self . topic . is_deleted = False #NEWLINE# for tag in self . topic . tags : #NEWLINE# #INDENT# atomic_add ( self , 'tagged' , 1 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# atomic_add ( self . topic , 'reply_count' , 1 ) #NEWLINE# #UNINDENT# self . is_deleted = False