diff options
author | luxagraf <sng@luxagraf.net> | 2023-12-03 15:59:34 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2023-12-03 15:59:34 -0500 |
commit | 6074d8cf4e9a2845afaca223810d8267df762adf (patch) | |
tree | 6de1efd8bbfcc8646acaab4150fed9fa4cc35afb /app/gtd/models.py | |
parent | ca54949a0596503f264b425f7f5547664ee6eba6 (diff) |
gtd: temporary fix to get DB back where it should be
Diffstat (limited to 'app/gtd/models.py')
-rw-r--r-- | app/gtd/models.py | 11 |
1 files changed, 8 insertions, 3 deletions
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() |