diff --git a/app/config_files/templates.json b/app/config_files/templates.json index feec10fb0..be2cd7331 100644 --- a/app/config_files/templates.json +++ b/app/config_files/templates.json @@ -22,7 +22,7 @@ "", "Click this link to create an account on Notify.gov:", "", - "((url))", + "[Join Service](url)", "", "", "This invitation will stop working at midnight tomorrow. This is to keep ((service_name)) secure." @@ -83,7 +83,7 @@ "To complete your registration for Notify.gov please click the link below", "", "", - "((url))" + "[Join Service](url)" ] }, { @@ -136,45 +136,10 @@ "Hi ((name)),", "", "", - "((service name)) is now live on Notify.gov.", + "Congratulations, we have received and reviewed your Go Live submission form. ((service name)) is now live on Notify.gov. With your Notify account you now can send messages for the use case outlined in your Go Live submission form.", "", "", - "You can send up to ((message limit)) messages per day.", - "", - "", - "As a live service, you’ll need to know who to contact if you have a question, or something goes wrong.", - "", - "", - "If our system status page shows a problem, then we’ve been alerted and are working on it – you don’t need to contact us.", - "", - "", - "#Problems or questions out of hours", - "", - "", - "We offer out of hours support for emergencies.", - "", - "", - "It’s only an emergency if:", - "", - "* no one in your team can log in", - "", - "* a ‘technical difficulties’ error appears when you try to upload a file", - "", - "* a 500 response code appears when you try to send messages using the API", - "", - "", - "If you have one of these emergencies, email details to:", - "", - "notify-support@gsa.gov", - "", - "", - "^Only use this email address for out of hours emergencies. Don’t share this address with people outside of your team.", - "", - "", - "We’ll get back to you within 30 minutes and give you hourly updates until the problem’s fixed.", - "", - "", - "For non-emergency problems or questions, use our support page and we’ll reply in office hours.", + "If you have any questions or experience any technical issues, please contact your pilot lead.", "", "", "Thanks", diff --git a/app/models.py b/app/models.py index d141d8c29..ae2a2d552 100644 --- a/app/models.py +++ b/app/models.py @@ -211,6 +211,7 @@ class User(db.Model): "services": [x.id for x in self.services if x.active], "can_use_webauthn": self.can_use_webauthn, "state": self.state, + "preferred_timezone": self.preferred_timezone, } def serialize_for_users_list(self): diff --git a/app/user/rest.py b/app/user/rest.py index f49f78c57..25714d94a 100644 --- a/app/user/rest.py +++ b/app/user/rest.py @@ -137,6 +137,7 @@ def update_user_attribute(user_id): ) send_notification_to_queue(saved_notification, queue=QueueNames.NOTIFY) + return jsonify(data=user_to_update.serialize()), 200 diff --git a/migrations/versions/0407_fix_preferred_timezone.py b/migrations/versions/0407_fix_preferred_timezone.py new file mode 100644 index 000000000..441b4dcef --- /dev/null +++ b/migrations/versions/0407_fix_preferred_timezone.py @@ -0,0 +1,18 @@ +""" + +Revises: 0406_adjust_agreement_model + +""" +from alembic import op + +down_revision = "0406_adjust_agreement_model" +revision = "0407_fix_preferred_timezone" + + +def upgrade(): + op.execute("update users set preferred_timezone='US/Eastern' where preferred_timezone=''") + + + +def downgrade(): + pass diff --git a/migrations/versions/0408_fix_timezone_again.py b/migrations/versions/0408_fix_timezone_again.py new file mode 100644 index 000000000..b39cb0191 --- /dev/null +++ b/migrations/versions/0408_fix_timezone_again.py @@ -0,0 +1,18 @@ +""" + +Revises: 0407_fix_preferred_timezone + +""" +from alembic import op + +down_revision = "0407_fix_preferred_timezone" +revision = "0408_fix_timezone_again" + + +def upgrade(): + op.execute("update users set preferred_timezone='US/Eastern' where (preferred_timezone='') is not false") + + + +def downgrade(): + pass diff --git a/poetry.lock b/poetry.lock index 8b154236f..b830bc058 100644 --- a/poetry.lock +++ b/poetry.lock @@ -112,13 +112,13 @@ frozenlist = ">=1.1.0" [[package]] name = "alembic" -version = "1.12.1" +version = "1.13.0" description = "A database migration tool for SQLAlchemy." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "alembic-1.12.1-py3-none-any.whl", hash = "sha256:47d52e3dfb03666ed945becb723d6482e52190917fdb47071440cfdba05d92cb"}, - {file = "alembic-1.12.1.tar.gz", hash = "sha256:bca5877e9678b454706347bc10b97cb7d67f300320fa5c3a94423e8266e2823f"}, + {file = "alembic-1.13.0-py3-none-any.whl", hash = "sha256:a23974ea301c3ee52705db809c7413cecd165290c6679b9998dd6c74342ca23a"}, + {file = "alembic-1.13.0.tar.gz", hash = "sha256:ab4b3b94d2e1e5f81e34be8a9b7b7575fc9dd5398fccb0bef351ec9b14872623"}, ] [package.dependencies] @@ -127,7 +127,7 @@ SQLAlchemy = ">=1.3.0" typing-extensions = ">=4" [package.extras] -tz = ["python-dateutil"] +tz = ["backports.zoneinfo"] [[package]] name = "amqp" @@ -1238,13 +1238,13 @@ pyflakes = ">=3.1.0,<3.2.0" [[package]] name = "flake8-bugbear" -version = "23.11.26" +version = "23.12.2" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." optional = false python-versions = ">=3.8.1" files = [ - {file = "flake8-bugbear-23.11.26.tar.gz", hash = "sha256:8e36119071bab626b6dab834fadd6d03c06090e9b189e67b4905821df8212fee"}, - {file = "flake8_bugbear-23.11.26-py3-none-any.whl", hash = "sha256:55d00c8a3c48c995c1f0ec0df54f8c9cf530c06035ce53975a03517d2e7f53e5"}, + {file = "flake8-bugbear-23.12.2.tar.gz", hash = "sha256:32b2903e22331ae04885dae25756a32a8c666c85142e933f43512a70f342052a"}, + {file = "flake8_bugbear-23.12.2-py3-none-any.whl", hash = "sha256:83324bad4d90fee4bf64dd69c61aff94debf8073fbd807c8b6a36eec7a2f0719"}, ] [package.dependencies] @@ -1378,13 +1378,13 @@ files = [ [[package]] name = "freezegun" -version = "1.2.2" +version = "1.3.1" description = "Let your Python tests travel through time" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "freezegun-1.2.2-py3-none-any.whl", hash = "sha256:ea1b963b993cb9ea195adbd893a48d573fda951b0da64f60883d7e988b606c9f"}, - {file = "freezegun-1.2.2.tar.gz", hash = "sha256:cd22d1ba06941384410cd967d8a99d5ae2442f57dfafeff2fda5de8dc5c05446"}, + {file = "freezegun-1.3.1-py3-none-any.whl", hash = "sha256:065e77a12624d05531afa87ade12a0b9bdb53495c4573893252a055b545ce3ea"}, + {file = "freezegun-1.3.1.tar.gz", hash = "sha256:48984397b3b58ef5dfc645d6a304b0060f612bcecfdaaf45ce8aff0077a6cb6a"}, ] [package.dependencies] @@ -2288,13 +2288,13 @@ files = [ [[package]] name = "moto" -version = "4.2.10" +version = "4.2.11" description = "" optional = false python-versions = ">=3.7" files = [ - {file = "moto-4.2.10-py2.py3-none-any.whl", hash = "sha256:5cf0736d1f43cb887498d00b00ae522774bfddb7db1f4994fedea65b290b9f0e"}, - {file = "moto-4.2.10.tar.gz", hash = "sha256:92595fe287474a31ac3ef847941ebb097e8ffb0c3d6c106e47cf573db06933b2"}, + {file = "moto-4.2.11-py2.py3-none-any.whl", hash = "sha256:58c12ab9ee69b6a5d1cddf83611ba4071508f07894317c57844b3ae6dc5bcd38"}, + {file = "moto-4.2.11.tar.gz", hash = "sha256:2da62d52eaa765dfe2762c920f0a88a58f3a09e04581c91db967d92faec848f1"}, ] [package.dependencies] @@ -2552,12 +2552,12 @@ requests = ">=2.0.0" [[package]] name = "notifications-utils" -version = "0.2.2" +version = "0.2.3" description = "" optional = false python-versions = ">=3.9,<3.12" files = [] -develop = true +develop = false [package.dependencies] async-timeout = "^4.0.2" @@ -2570,7 +2570,7 @@ certifi = "^2023.7.22" cffi = "^1.16.0" charset-normalizer = "^3.1.0" click = "^8.1.3" -cryptography = "^41.0.4" +cryptography = "^41.0.6" flask = "^2.3.2" flask-redis = "^0.4.0" geojson = "^3.0.1" @@ -2604,7 +2604,7 @@ werkzeug = "^3.0.1" type = "git" url = "https://github.com/GSA/notifications-utils.git" reference = "HEAD" -resolved_reference = "f43dbe3ac846d2a7c06f98120ca4533043d9f864" +resolved_reference = "4cdd67a377f4a6dea1f96b26ba5a1a4bca9afce3" [[package]] name = "numpy" @@ -4687,4 +4687,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "10925d79f398afa263501dac8384b2e278bee2fae47a4eafc8ad94dbf8325cbc" +content-hash = "17c933f0534e3b910702de7dc90a23147f3ffb739a7c76a30dcd4ae09db771c6" diff --git a/pyproject.toml b/pyproject.toml index f894c737d..904b256c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ readme = "README.md" [tool.poetry.dependencies] python = ">=3.9,<3.12" -alembic = "==1.12.1" +alembic = "==1.13.0" amqp = "==5.2.0" beautifulsoup4 = "==4.12.2" boto3 = "^1.29.6" @@ -39,7 +39,7 @@ marshmallow = "==3.20.1" marshmallow-sqlalchemy = "==0.29.0" newrelic = "*" notifications-python-client = "==8.1.0" -notifications-utils = {git = "https://github.com/GSA/notifications-utils.git", develop = true} +notifications-utils = {git = "https://github.com/GSA/notifications-utils.git"} oscrypto = "==1.3.0" packaging = "==23.2" poetry-dotenv-plugin = "==0.2.0" @@ -57,12 +57,12 @@ black = "^23.11.0" cloudfoundry-client = "*" exceptiongroup = "==1.2.0" flake8 = "^6.1.0" -flake8-bugbear = "^23.11.26" -freezegun = "^1.2.2" +flake8-bugbear = "^23.12.2" +freezegun = "^1.3.1" honcho = "*" isort = "^5.12.0" jinja2-cli = {version = "==0.8.2", extras = ["yaml"]} -moto = "==4.2.10" +moto = "==4.2.11" pip-audit = "*" pre-commit = "^3.5.0" pytest = "^7.4.3"