mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-16 18:29:40 +00:00
Parameterize bitwarden_collection_id (#520)
This commit is contained in:
parent
0031e6b470
commit
8155be9ff2
1 changed files with 10 additions and 1 deletions
|
@ -151,13 +151,22 @@ class WorkflowRunContext:
|
||||||
LOG.error(f"URL parameter {parameter.url_parameter_key} not found or has no value")
|
LOG.error(f"URL parameter {parameter.url_parameter_key} not found or has no value")
|
||||||
raise ValueError("URL parameter for Bitwarden login credentials not found or has no value")
|
raise ValueError("URL parameter for Bitwarden login credentials not found or has no value")
|
||||||
|
|
||||||
|
collection_id = None
|
||||||
|
if parameter.bitwarden_collection_id:
|
||||||
|
if self.has_parameter(parameter.bitwarden_collection_id) and self.has_value(
|
||||||
|
parameter.bitwarden_collection_id
|
||||||
|
):
|
||||||
|
collection_id = self.values[parameter.bitwarden_collection_id]
|
||||||
|
else:
|
||||||
|
collection_id = parameter.bitwarden_collection_id
|
||||||
|
|
||||||
try:
|
try:
|
||||||
secret_credentials = BitwardenService.get_secret_value_from_url(
|
secret_credentials = BitwardenService.get_secret_value_from_url(
|
||||||
client_id,
|
client_id,
|
||||||
client_secret,
|
client_secret,
|
||||||
master_password,
|
master_password,
|
||||||
url,
|
url,
|
||||||
collection_id=parameter.bitwarden_collection_id,
|
collection_id=collection_id,
|
||||||
)
|
)
|
||||||
if secret_credentials:
|
if secret_credentials:
|
||||||
self.secrets[BitwardenConstants.URL] = url
|
self.secrets[BitwardenConstants.URL] = url
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue