because date_last_updated and date_last_message change when we call the
newMessage method, but we don't update the representation.
The original fix for this bug was server side. Leonard, is there something we can
change server side for this?
On the client side, we could fix this problem by changing NamedOpearation.__call__
which currently does
if response.status == 201:
return self._handle_201_response(url, response, content)
else:
if http_method == 'post':
# The method call probably modified this resource in
# an unknown way. Refresh its representation. self.resource.lp_refresh()
return self._handle_200_response(url, response, content)
where we could move the the if http_method block outside the other if block, so that
we refresh when we create the new message.
Right, I can still reproduce by doing
bug = lp.bugs[12345] e(content= "foo", subject="bar)
bug.newMessag
bug.tags = ["foo"]
bug.lp_save()
because date_last_updated and date_last_message change when we call the
newMessage method, but we don't update the representation.
The original fix for this bug was server side. Leonard, is there something we can
change server side for this?
On the client side, we could fix this problem by changing NamedOpearation .__call_ _
which currently does
if response.status == 201: 201_response( url, response, content)
self. resource. lp_refresh( ) 200_response( url, response, content)
return self._handle_
else:
if http_method == 'post':
# The method call probably modified this resource in
# an unknown way. Refresh its representation.
return self._handle_
where we could move the the if http_method block outside the other if block, so that
we refresh when we create the new message.
What's the best approach?
Thanks,
James