Fix tts check being backwards
This commit is contained in:
parent
701bd0b19f
commit
dddb46a627
|
@ -65,12 +65,6 @@ class Item:
|
||||||
def display_title(self):
|
def display_title(self):
|
||||||
return self._item.get("title", self._item["id"])
|
return self._item.get("title", self._item["id"])
|
||||||
|
|
||||||
@property
|
|
||||||
def abs_tts(self):
|
|
||||||
if "tts" not in self._item:
|
|
||||||
return None
|
|
||||||
return self._item["created"] + self._item["tts"]
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def can_remove(self):
|
def can_remove(self):
|
||||||
# The time-to-live fields protects an item from removal until expiry.
|
# The time-to-live fields protects an item from removal until expiry.
|
||||||
|
@ -94,7 +88,7 @@ class Item:
|
||||||
def before_tts(self):
|
def before_tts(self):
|
||||||
return (
|
return (
|
||||||
"tts" in self._item
|
"tts" in self._item
|
||||||
and self._item["created"] + self._item["tts"] < current_time()
|
and current_time() < self._item["created"] + self._item["tts"]
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue