mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
Don't allow docs comments on unsupported versions
This commit is contained in:
@ -128,6 +128,11 @@ def manualarchive(request):
|
||||
|
||||
@login_required
|
||||
def commentform(request, itemid, version, filename):
|
||||
v = get_object_or_404(Version, tree=version)
|
||||
if not v.supported:
|
||||
# No docs comments on unsupported versions
|
||||
return HttpResponseRedirect("/docs/{0}/static/{1}".format(version, filename))
|
||||
|
||||
if request.method == 'POST':
|
||||
form = DocCommentForm(request.POST)
|
||||
if form.is_valid():
|
||||
|
Reference in New Issue
Block a user