You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2022/02/01 22:01:54 UTC
[allura] branch kt/discussion-stats created (now dc9c5b4)
This is an automated email from the ASF dual-hosted git repository.
kentontaylor pushed a change to branch kt/discussion-stats
in repository https://gitbox.apache.org/repos/asf/allura.git.
at dc9c5b4 Prevent discussion stats endpoint from 500ing if hit without parameters
This branch includes the following new commits:
new dc9c5b4 Prevent discussion stats endpoint from 500ing if hit without parameters
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[allura] 01/01: Prevent discussion stats endpoint from 500ing if hit without parameters
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kentontaylor pushed a commit to branch kt/discussion-stats
in repository https://gitbox.apache.org/repos/asf/allura.git
commit dc9c5b4757000251ea88f3057ac8c6c95b47b71d
Author: Kenton Taylor <kt...@slashdotmedia.com>
AuthorDate: Tue Feb 1 22:01:34 2022 +0000
Prevent discussion stats endpoint from 500ing if hit without parameters
---
ForgeDiscussion/forgediscussion/controllers/root.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ForgeDiscussion/forgediscussion/controllers/root.py b/ForgeDiscussion/forgediscussion/controllers/root.py
index 29266fc..742fd9c 100644
--- a/ForgeDiscussion/forgediscussion/controllers/root.py
+++ b/ForgeDiscussion/forgediscussion/controllers/root.py
@@ -219,9 +219,9 @@ class RootController(BaseController, DispatchIndex, FeedController):
@expose('json:')
@validate(dict(
- begin=h.DateTimeConverter(if_empty=None, if_invalid=None),
- end=h.DateTimeConverter(if_empty=None, if_invalid=None),
- ))
+ begin=h.DateTimeConverter(not_empty=True),
+ end=h.DateTimeConverter(not_empty=True),
+ ), error_handler=stats)
def stats_data(self, begin=None, end=None, forum=None, **kw):
end = end or date.today()
begin = begin or end - timedelta(days=60)