Right, I can still reproduce by doing
bug = lp.bugs[12345]
bug.newMessage(content="foo", subject="bar)
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:
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.
What's the best approach?
Thanks,
James
--
When adding tag or updating description, lp_save() gives "HTTP Error 412:
Precondition Failed"
https://bugs.launchpad.net/bugs/336866
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs