this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix 500 on extensions read

+11 -3
+11 -3
care/emr/extensions/base.py
··· 66 66 def schema_key(self, action): 67 67 return f"CORE_EXTENSIONS_{self.resource_type.value.upper()}_{action}" 68 68 69 + def get_env_value(self, key): 70 + if not getenv(key): 71 + return {} 72 + try: 73 + return json.loads(getenv(key)) 74 + except Exception as e: 75 + raise ValueError("Invalid JSON") from e 76 + 69 77 def get_write_schema(self): 70 - return json.loads(getenv(self.schema_key("WRITE"))) or {} 78 + return self.get_env_value(self.schema_key("WRITE")) 71 79 72 80 def get_read_schema(self): 73 - return json.loads(getenv(self.schema_key("READ"))) or self.get_write_schema() 81 + return self.get_env_value(self.schema_key("READ")) or self.get_write_schema() 74 82 75 83 def get_retrieve_schema(self): 76 - return json.loads(getenv(self.schema_key("RETRIEVE"))) or self.get_read_schema() 84 + return self.get_env_value(self.schema_key("RETRIEVE")) or self.get_read_schema() 77 85 78 86 def validate(self, data, resource=None): 79 87 write_schema = self.get_write_schema()