mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 08:31:00 -04:00
Upgrade pyexcel-io, which also upgrades Werkzeug
Upgraded pyexcel-io from 0.5.14 to 0.5.16. This change causes Werkzeug to be upgraded from 0.14.1 to 0.15.1 which requires some changes: * ProxyFix now needs to be imported from a different location * The status code of RequestRedirect has changed from 301 to 308. Since status code 308 is not currently supported on Internet Explorer with Windows 7 and 8.1, this subclasses RequestRedirect to keep the status code of 301. changelog: https://werkzeug.palletsprojects.com/en/0.15.x/changes/#version-0-15-0
This commit is contained in:
10
app/utils.py
10
app/utils.py
@@ -36,6 +36,7 @@ from notifications_utils.template import (
|
||||
from notifications_utils.timezones import convert_utc_to_bst
|
||||
from orderedset._orderedset import OrderedSet
|
||||
from werkzeug.datastructures import MultiDict
|
||||
from werkzeug.routing import RequestRedirect
|
||||
|
||||
SENDING_STATUSES = ['created', 'pending', 'sending', 'pending-virus-check']
|
||||
DELIVERED_STATUSES = ['delivered', 'sent', 'returned-letter']
|
||||
@@ -680,3 +681,12 @@ def redact_mobile_number(mobile_number, spacing=""):
|
||||
for i in indices:
|
||||
mobile_number_list[i] = redact_character
|
||||
return "".join(mobile_number_list)
|
||||
|
||||
|
||||
class PermanentRedirect(RequestRedirect):
|
||||
"""
|
||||
In Werkzeug 0.15.0 the status code for RequestRedirect changed from 301 to 308.
|
||||
308 status codes are not supported when Internet Explorer is used with Windows 7
|
||||
and Windows 8.1, so this class keeps the original status code of 301.
|
||||
"""
|
||||
code = 301
|
||||
|
||||
Reference in New Issue
Block a user