diff options
author | W. Trevor King <wking@drexel.edu> | 2009-10-20 09:30:42 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-10-20 09:30:42 -0400 |
commit | 501014a3f86bdfb7be7b52c6d1d0eb4fd7a75f02 (patch) | |
tree | 3813119aab22972f095fd70734077f03dddb4f24 /libbe | |
parent | 833adcb9c41ff0aa82700ab0c99277d23fc18dd7 (diff) | |
download | bugseverywhere-501014a3f86bdfb7be7b52c6d1d0eb4fd7a75f02.tar.gz |
Pass content_type to Comment.new_reply() to fix error adding non-text/ comments
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/comment.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbe/comment.py b/libbe/comment.py index 41bc7e6..02bcc93 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -604,7 +604,7 @@ class Comment(Tree, settings_object.SavedSettingsObject): reply.in_reply_to = self.uuid self.append(reply) - def new_reply(self, body=None): + def new_reply(self, body=None, content_type=None): """ >>> comm = Comment(bug=None, body="Some insightful remarks") >>> repA = comm.new_reply("Critique original comment") @@ -613,6 +613,8 @@ class Comment(Tree, settings_object.SavedSettingsObject): True """ reply = Comment(self.bug, body=body) + if content_type != None: # set before saving body to decide binary format + reply.content_type = content_type if self.bug != None: reply.set_sync_with_disk(self.bug.sync_with_disk) if reply.sync_with_disk == True: |