Permalink
Browse files

Bug 740170 - ensure consistent timestamps for PUT requests; r=telliott

  • Loading branch information...
1 parent dbe90a0 commit b63e0b42c0db1a3f7174eb82d7231ccdb13fe0ae @rfk rfk committed Mar 29, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 syncstorage/controller.py
  2. +1 −1 syncstorage/storage/memcachedsql.py
@@ -289,7 +289,8 @@ def set_item(self, request):
if self._has_modifiers(bso):
bso['modified'] = request.server_time
- modified = storage.set_item(user_id, collection_name, item_id, **bso)
+ modified = storage.set_item(user_id, collection_name, item_id,
+ storage_time=request.server_time, **bso)
if modified:
response = HTTPNoContent()
@@ -176,7 +176,7 @@ def _update_cache(self, user_id, collection_name, items, storage_time):
self.cache.set_tabs(user_id, tabs)
def _update_item(self, item, when):
- if 'payload' in item:
+ if 'payload' in item and 'modified' not in item:
item['modified'] = when
def set_item(self, user_id, collection_name, item_id, storage_time=None,

0 comments on commit b63e0b4

Please sign in to comment.