Commits

mitsuhiko  committed 5dc7171

Fixed a bug where changing the comment parser did not trigger the parsing [#157]

  • Participants
  • Parent commits 2b1d851

Comments (0)

Files changed (2)

   URIs now (passwords).
 - the text parser no longer supports images and youtube links for security
   and sanity reasons.
+- Fixed a bug where changing the comment parser did not trigger the parsing.
 
 
 Zine 0.1.1

File zine/forms.py

 
     def save_changes(self):
         """Save the changes back to the database."""
-        forms.set_fields(self.comment, self.data, 'text', 'pub_date', 'parser',
+        old_parser = self.comment.parser
+        forms.set_fields(self.comment, self.data, 'pub_date', 'parser',
                          'blocked_msg')
 
+        if (self.data['text'] != self.comment.text
+            or self.data['parser'] != old_parser):
+            self.comment.text = self.data['text']
+
         # update status
         if self.data['blocked']:
             if not self.comment.blocked: