From 25603d698762cae51f1952e4ff48680dc89e45a5 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 3 Dec 2023 16:09:24 -0500 Subject: gtd: got rid of NEW status for wired posts because that's what assigned is --- app/gtd/models.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'app/gtd') diff --git a/app/gtd/models.py b/app/gtd/models.py index c892761..35069bf 100644 --- a/app/gtd/models.py +++ b/app/gtd/models.py @@ -148,7 +148,6 @@ class PostStatus(models.IntegerChoices): ASSIGNED = 0, ('Assigned') TURNEDIN = 1, ('turned in') PUBLISHED = 2, ('published') - NEW = 3, ('NEW') class WiredPost(models.Model): # an entry in a feed @@ -182,15 +181,8 @@ class WiredPost(models.Model): td = datetime.date.today() - self.date_last_pub if self.post_status == 0 or self.post_status == 2: if td.days > self.update_frequency: - print(self, self.post_status) self.needs_update = True self.save() - else: - self.needs_update = False - self.save() - else: - self.needs_update = False - self.save() return '' def days_overdue(self): @@ -209,7 +201,7 @@ class WiredPost(models.Model): def save(self, *args, **kwargs): if self.date_last_pub: td = datetime.date.today() - self.date_last_pub - if td.days > self.update_frequency and self.post_status != 1: + if td.days > self.update_frequency and self.post_status == 2: self.needs_update = True else: self.needs_update = False -- cgit v1.2.3-70-g09d2