bump spiffworkflow, fix bug in normalize_value

This commit is contained in:
Dan 2022-09-30 13:00:06 -04:00
parent 69d8a8b146
commit 8410c641f3
2 changed files with 3 additions and 1 deletions

2
poetry.lock generated
View File

@ -1866,7 +1866,7 @@ pytz = "*"
type = "git"
url = "https://github.com/sartography/SpiffWorkflow"
reference = "main"
resolved_reference = "5eb4c1901efeae046fd3ecb0cca375e1eeaf38e7"
resolved_reference = "98d0115b309f75461f82280813e37a3084ecd9e1"
[[package]]
name = "sqlalchemy"

View File

@ -21,6 +21,8 @@ class ServiceTaskDelegate:
def normalize_value(value: Any) -> Any:
"""Normalize_value."""
secret_prefix = "secret:" # noqa: S105
if isinstance(value, dict):
value = json.dumps(value)
if value.startswith(secret_prefix):
key = value.removeprefix(secret_prefix)
value = SecretService().get_secret(key)