Commit a986faea authored by Ozzieisaacs's avatar Ozzieisaacs

Merge remote-tracking branch 'fix/fix_creation_time' into Develop

parents ad71d0a0 a6f4db0f
...@@ -121,7 +121,7 @@ def HandleSyncRequest(): ...@@ -121,7 +121,7 @@ def HandleSyncRequest():
changed_entries = ( changed_entries = (
db.session.query(db.Books) db.session.query(db.Books)
.join(db.Data) .join(db.Data)
.filter(func.datetime(db.Books.last_modified) != sync_token.books_last_modified) .filter(func.datetime(db.Books.last_modified) > sync_token.books_last_modified)
.filter(db.Data.format.in_(KOBO_FORMATS)) .filter(db.Data.format.in_(KOBO_FORMATS))
.all() .all()
) )
...@@ -140,7 +140,7 @@ def HandleSyncRequest(): ...@@ -140,7 +140,7 @@ def HandleSyncRequest():
new_books_last_modified = max( new_books_last_modified = max(
book.last_modified, sync_token.books_last_modified book.last_modified, sync_token.books_last_modified
) )
new_books_last_created = max(book.timestamp, sync_token.books_last_modified) new_books_last_created = max(book.timestamp, sync_token.books_last_created)
sync_token.books_last_created = new_books_last_created sync_token.books_last_created = new_books_last_created
sync_token.books_last_modified = new_books_last_modified sync_token.books_last_modified = new_books_last_modified
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment