<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br><br>
<br>
This is missing that we want to avoid the SerializerMethodField.<br>
Second, usually the imperative "do X" is preferred to the passive ("X is<br>
done"):<br></blockquote>Still need to work on writing the better commit messages. <br><div class="gmail_quote"></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Applied the first two patches, thanks! </blockquote><div>Should I send the third patch separately? </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Paolo<br>
<br>
> <br>
> On Tue, May 8, 2018 at 6:51 PM Paolo Bonzini <<a href="mailto:pbonzini@redhat.com" target="_blank">pbonzini@redhat.com</a><br>
> <mailto:<a href="mailto:pbonzini@redhat.com" target="_blank">pbonzini@redhat.com</a>>> wrote:<br>
> <br>
> On 08/05/2018 13:50, Shubham Jain wrote:<br>
> > Rename the existing "mbox" field to e.g. "mbox_blob" and add<br>
> getters and setters for "mbox"<br>
> <br>
> The same remark about the "why" holds here. Would you like to try<br>
> (re)writing this commit message yourself? Just replying to this mail<br>
> will do.<br>
> <br>
> Thanks!<br>
> <br>
> Paolo<br>
> <br>
> > ---<br>
> > api/models.py | 22 ++++++++++++++--------<br>
> > 1 file changed, 14 insertions(+), 8 deletions(-)<br>
> ><br>
> > diff --git a/api/models.py b/api/models.py<br>
> > index 504f2c7..e161325 100644<br>
> > --- a/api/models.py<br>
> > +++ b/api/models.py<br>
> > @@ -321,20 +321,26 @@ class Message(models.Model):<br>
> > <br>
> > objects = MessageManager()<br>
> > <br>
> > - def save_mbox(self, mbox):<br>
> > - save_blob(mbox, self.message_id)<br>
> > + def save_mbox(self, mbox_blob):<br>
> > + save_blob(mbox_blob, self.message_id)<br>
> > <br>
> > def get_mbox_obj(self):<br>
> > self.get_mbox()<br>
> > return self._mbox_obj<br>
> > <br>
> > def get_mbox(self):<br>
> > - if hasattr(self, "mbox"):<br>
> > - return self.mbox<br>
> > - self.mbox = load_blob(self.message_id)<br>
> > - self._mbox_obj = MboxMessage(self.mbox)<br>
> > - return self.mbox<br>
> > -<br>
> > + if hasattr(self, "mbox_blob"):<br>
> > + return self.mbox_blob<br>
> > + self.mbox_blob = load_blob(self.message_id)<br>
> > + self._mbox_obj = MboxMessage(self.mbox_blob)<br>
> > + return self.mbox_blob<br>
> > + <br>
> > + mbox = property(get_mbox)<br>
> > +<br>
> > + @mbox.setter<br>
> > + def mbox(self, value):<br>
> > + self.mbox_blob = value<br>
> > + <br>
> > def get_num(self):<br>
> > assert self.is_patch or self.is_series_head<br>
> > cur, total = 1, 1<br>
> ><br>
> <br>
<br>
</blockquote></div></div>