Show More
@@ -418,7 +418,7 b' def api_get_post(request, post_id):' | |||
|
418 | 418 | def api_get_threaddiff(request, thread_id, last_update_time): |
|
419 | 419 | """Get posts that were changed or added since time""" |
|
420 | 420 | |
|
421 | thread = get_object_or_404(Post, id=thread_id) | |
|
421 | thread = get_object_or_404(Post, id=thread_id).thread_new | |
|
422 | 422 | |
|
423 | 423 | filter_time = datetime.fromtimestamp(float(last_update_time) / 1000000, |
|
424 | 424 | timezone.get_current_timezone()) |
@@ -428,10 +428,10 b' def api_get_threaddiff(request, thread_i' | |||
|
428 | 428 | 'updated': [], |
|
429 | 429 | 'last_update': None, |
|
430 | 430 | } |
|
431 | added_posts = Post.objects.filter(thread=thread, | |
|
431 | added_posts = Post.objects.filter(thread_new=thread, | |
|
432 | 432 | pub_time__gt=filter_time)\ |
|
433 | 433 | .order_by('pub_time') |
|
434 | updated_posts = Post.objects.filter(thread=thread, | |
|
434 | updated_posts = Post.objects.filter(thread_new=thread, | |
|
435 | 435 | pub_time__lte=filter_time, |
|
436 | 436 | last_edit_time__gt=filter_time) |
|
437 | 437 | for post in added_posts: |
General Comments 0
You need to be logged in to leave comments.
Login now