1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-23 05:24:18 +00:00

🐛 Fix more bugs

This commit is contained in:
Steffo 2021-05-30 17:47:11 +02:00
parent 8d591befb9
commit f478fc8434
Signed by: steffo
GPG key ID: 6965406171929D01
3 changed files with 4 additions and 3 deletions

View file

@ -21,5 +21,5 @@ class Tweet(ext.Model):
def to_json(self): def to_json(self):
return {"snowflake": self.snowflake, "content": self.content, "location": self.location, "poster": self.poster, 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]} "image_url": self.image_url, "conditions": [c.condition.to_json() for c in self.conditions]}

View file

@ -15,7 +15,7 @@ export default function BoxAlerts({ alerts, destroy, running, ...props }) {
} }
return alerts.map(alert => ( return alerts.map(alert => (
<SummaryAlert alert={alert} destroy={() => destroy(alert["id"])} running={running}/> <SummaryAlert alert={alert} destroy={() => destroy(alert["id"])} key={alert["id"]} running={running}/>
)) ))
}, },
[alerts, running, destroy] [alerts, running, destroy]

View file

@ -211,7 +211,8 @@ export class FilterInsideTimeRay extends Filter {
} }
check(tweet) { 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() { display() {