From f478fc84345eae2dcf66a484b8d82b0e4f6434a6 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 30 May 2021 17:47:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20more=20bugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nest_backend/database/tables/Tweet.py | 2 +- nest_frontend/components/interactive/BoxAlerts.js | 2 +- nest_frontend/objects/Filter.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nest_backend/database/tables/Tweet.py b/nest_backend/database/tables/Tweet.py index dedf732..69fb8dd 100644 --- a/nest_backend/database/tables/Tweet.py +++ b/nest_backend/database/tables/Tweet.py @@ -21,5 +21,5 @@ class Tweet(ext.Model): def to_json(self): return {"snowflake": self.snowflake, "content": self.content, "location": self.location, "poster": self.poster, - "place": self.place, "insert_time": self.insert_time.isoformat(), "post_time": self.post_time, + "place": self.place, "insert_time": self.insert_time.isoformat(), "post_time": self.post_time.isoformat(), "image_url": self.image_url, "conditions": [c.condition.to_json() for c in self.conditions]} diff --git a/nest_frontend/components/interactive/BoxAlerts.js b/nest_frontend/components/interactive/BoxAlerts.js index 36aeabf..fe1f726 100644 --- a/nest_frontend/components/interactive/BoxAlerts.js +++ b/nest_frontend/components/interactive/BoxAlerts.js @@ -15,7 +15,7 @@ export default function BoxAlerts({ alerts, destroy, running, ...props }) { } return alerts.map(alert => ( - destroy(alert["id"])} running={running}/> + destroy(alert["id"])} key={alert["id"]} running={running}/> )) }, [alerts, running, destroy] diff --git a/nest_frontend/objects/Filter.js b/nest_frontend/objects/Filter.js index 8f65dcf..7b096fb 100644 --- a/nest_frontend/objects/Filter.js +++ b/nest_frontend/objects/Filter.js @@ -211,7 +211,8 @@ export class FilterInsideTimeRay extends Filter { } check(tweet) { - return this.datetime < new Date(tweet["insert_time"]) + console.debug(this.timeRay.date, tweet["post_time"]) + return this.timeRay.includes(new Date(tweet["post_time"])) } display() {