Skip to content

Commit

Permalink
Fixed config bug
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Jun 3, 2024
1 parent 2ca3f4f commit 6d6ef25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions bbconf/config_parser/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ class ConfigS3(BaseModel):
bucket: Union[str, None] = DEFAULT_S3_BUCKET

@field_validator("aws_access_key_id", "aws_secret_access_key")
def validate_aws_credentials(cls, values):
for value in values:
if value in ["AWS_SECRET_ACCESS_KEY", "AWS_ACCESS_KEY_ID"]:
return None
def validate_aws_credentials(cls, value):
# Do this if AWS credentials are not provided
if value in ["AWS_SECRET_ACCESS_KEY", "AWS_ACCESS_KEY_ID"]:
return None
return value


class ConfigPepHubClient(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ docker run --rm -it --name bedbase-test \
-e POSTGRES_PASSWORD=docker\
-e POSTGRES_DB=bedbase \
-p 5432:5432 postgres
```
```

0 comments on commit 6d6ef25

Please sign in to comment.