overdue
This commit is contained in:
parent
bff65bfff0
commit
cd112d0b4c
@ -31,7 +31,6 @@ def update_task(
|
||||
) -> Task:
|
||||
with db.atomic():
|
||||
task = Task.get_by_id(task_id)
|
||||
|
||||
query = Task.update(kwargs).where(Task.id == task_id)
|
||||
query.execute()
|
||||
task = Task.get_by_id(task_id)
|
||||
|
@ -1,5 +1,6 @@
|
||||
import re
|
||||
import datetime
|
||||
from rich.text import Text
|
||||
|
||||
|
||||
def remove_rich_tag(text):
|
||||
@ -39,7 +40,7 @@ def get_colored_date(date: datetime.date) -> str:
|
||||
as_str = date.strftime("%Y-%m-%d")
|
||||
today = datetime.date.today()
|
||||
if date.date() < today:
|
||||
color = "#FF0000"
|
||||
return Text(as_str, style="black on red")
|
||||
else:
|
||||
# Calculate weeks into future
|
||||
delta = date.date() - today
|
||||
|
Loading…
Reference in New Issue
Block a user