From 6074d8cf4e9a2845afaca223810d8267df762adf Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 3 Dec 2023 15:59:34 -0500 Subject: gtd: temporary fix to get DB back where it should be --- app/gtd/models.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'app/gtd') diff --git a/app/gtd/models.py b/app/gtd/models.py index 5a371d9..c892761 100644 --- a/app/gtd/models.py +++ b/app/gtd/models.py @@ -180,9 +180,14 @@ class WiredPost(models.Model): def set_needs_update(self): if self.date_last_pub: td = datetime.date.today() - self.date_last_pub - if self.post_status == 0 or 2 and td.days > self.update_frequency: - self.needs_update = True - self.save() + 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() -- cgit v1.2.3-70-g09d2