diff options
author | luxagraf <sng@luxagraf.net> | 2023-12-03 16:09:24 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2023-12-03 16:09:24 -0500 |
commit | 25603d698762cae51f1952e4ff48680dc89e45a5 (patch) | |
tree | e4623e1958eaafad8654118636834b095c7bde2e | |
parent | 6074d8cf4e9a2845afaca223810d8267df762adf (diff) |
gtd: got rid of NEW status for wired posts because that's what assigned
is
-rw-r--r-- | app/gtd/models.py | 10 |
1 files changed, 1 insertions, 9 deletions
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 |