From 774b2a5e505f49b04244aefde88366e7dae0f53c Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 7 Nov 2016 12:42:26 -0500 Subject: [PATCH] update bump logic --- contrib/frontends/django/nntpchan/nntpchan/frontend/models.py | 4 ++-- contrib/frontends/django/nntpchan/nntpchan/views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/frontends/django/nntpchan/nntpchan/frontend/models.py b/contrib/frontends/django/nntpchan/nntpchan/frontend/models.py index 89800d6..f6f82a5 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/frontend/models.py +++ b/contrib/frontends/django/nntpchan/nntpchan/frontend/models.py @@ -97,6 +97,6 @@ class Post(models.Model): frag = util.hashid(self.msgid) return reverse('frontend:thread', args=[op]) + '#{}'.format(frag) - def bump(self): + def bump(self, last): if self.is_op(): - self.last_bumped = util.time_int(datetime.now()) + self.last_bumped = last diff --git a/contrib/frontends/django/nntpchan/nntpchan/views.py b/contrib/frontends/django/nntpchan/nntpchan/views.py index 882ec68..b9d0854 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/views.py +++ b/contrib/frontends/django/nntpchan/nntpchan/views.py @@ -127,7 +127,7 @@ def webhook(request): 'subject': 'OP Not Found', 'newsgroup': group}, msgid=opmsgid) if bump: - op.bump() + op.bump(post.posted) op.save() except Exception as ex: