Skip to content

Commit 989199d

Browse files
Nathan ParkerNathan Parker
authored andcommitted
e2e testing in cloud run
1 parent 07dffe0 commit 989199d

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

src/core/api/routes/okh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ async def create_okh(
148148

149149
# Create enhanced response using the proper OKHResponse structure
150150
from ...models.base import APIStatus
151-
151+
152152
result_dict = result.to_dict() if hasattr(result, "to_dict") else result
153153
response_data = {
154154
**result_dict, # Include all OKHResponse fields

src/core/api/routes/okw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async def create_okw(
201201

202202
# Create enhanced response matching OKWResponse structure
203203
from ...models.base import APIStatus
204-
204+
205205
response_data = {
206206
**facility_dict, # Include all facility fields directly
207207
"status": APIStatus.SUCCESS,

src/core/models/okh.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,18 @@ def from_dict(cls, data: Dict) -> "OKHManifest":
658658
]:
659659
if field in data and data[field] is not None:
660660
# For list fields, ensure they're not None (use empty list instead)
661-
if field in ["tool_list", "manufacturing_processes", "tsdc", "sub_parts", "keywords"]:
662-
setattr(instance, field, data[field] if isinstance(data[field], list) else [])
661+
if field in [
662+
"tool_list",
663+
"manufacturing_processes",
664+
"tsdc",
665+
"sub_parts",
666+
"keywords",
667+
]:
668+
setattr(
669+
instance,
670+
field,
671+
data[field] if isinstance(data[field], list) else [],
672+
)
663673
else:
664674
setattr(instance, field, data[field])
665675

0 commit comments

Comments
 (0)