Skip to content

Commit

Permalink
fixing non required import
Browse files Browse the repository at this point in the history
  • Loading branch information
osimuka committed Nov 18, 2024
1 parent dbb63ea commit f7d07b8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions trade_remedies_public/config/cf_env.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, Any
from typing import Optional, Any, Dict
from pydantic import BaseModel, ConfigDict, Field
from pydantic_settings import BaseSettings

Expand Down Expand Up @@ -50,15 +50,6 @@ class CloudFoundrySettings(BaseSettings):
DEFAULT_CHUNK_SIZE: int = 33554432
FILE_MAX_SIZE_BYTES: int = 31457280

@validator("BASIC_AUTH_USER", pre=True)
def parse_basic_auth_user(cls, value):
if isinstance(value, str):
try:
return json.loads(value)
except json.JSONDecodeError:
raise ValueError("Invalid JSON for BASIC_AUTH_USER")
return value

def get_allowed_hosts(self) -> list[str]:
return self.ALLOWED_HOSTS.split(",") if self.ALLOWED_HOSTS else ["localhost"]

Expand Down

0 comments on commit f7d07b8

Please sign in to comment.