From 7bd615c5f97a335b576b572487c3d917e250a6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Mon, 18 Jun 2018 11:04:22 +0200 Subject: [PATCH] Always update video metadata --- comments-api/sync.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/comments-api/sync.py b/comments-api/sync.py index 134eb4b..174fd43 100644 --- a/comments-api/sync.py +++ b/comments-api/sync.py @@ -51,9 +51,8 @@ class Sync(object): created_at = cls._get(vid, 'created_at') updated_at = cls._to_datetime(cls._get(vid, 'updated_at', default=created_at)) created_at = cls._to_datetime(created_at) - if video.updated_at and video.updated_at >= updated_at: - continue - updated.append(id) + if not video.updated_at or video.updated_at < updated_at: + updated.append(id) video.broadcast_type = cls._get(vid, 'broadcast_type') video.title = cls._get(vid, 'title') video.description = cls._get(vid, 'description')