Skip to content

Commit 9a268b3

Browse files
authored
Merge branch 'develop' into develop
2 parents be5c67a + 4b28003 commit 9a268b3

33 files changed

+8447
-60
lines changed

libs/labelbox/src/labelbox/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,4 @@
101101
from labelbox.schema.taskstatus import TaskStatus
102102
from labelbox.schema.api_key import ApiKey
103103
from labelbox.schema.timeunit import TimeUnit
104+
from labelbox.schema.workflow import ProjectWorkflow

libs/labelbox/src/labelbox/schema/api_key.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,22 @@ def created_by(self) -> Optional["User"]:
4545
"""Gets the User who created this API key.
4646
4747
Returns:
48-
Optional[User]: The User who created this API key, or None if not available
48+
Optional[User]: The User who created this API key, or None if not available.
4949
"""
5050
if not hasattr(self, "_created_by"):
51+
# Use created_by_user_id if present, otherwise fall back to user_id
52+
# (typically needed for older API keys where created_by_user_id is NULL)
53+
user_id_to_fetch = (
54+
self.created_by_user_id
55+
if self.created_by_user_id is not None
56+
else self.user_id
57+
)
5158
self._created_by = (
52-
self.client._get_single(User, self.created_by_user_id)
53-
if self.created_by_user_id
59+
self.client._get_single(User, user_id_to_fetch)
60+
if user_id_to_fetch
5461
else None
5562
)
63+
5664
return self._created_by
5765

5866
@property

libs/labelbox/src/labelbox/schema/foundry/foundry_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def _create_app(self, app: App) -> App:
1818
$name: String!, $modelId: ID!, $ontologyId: ID!, $description: String, $inferenceParams: Json!, $classToSchemaId: Json!
1919
){{
2020
createModelFoundryApp(input: {{
21-
name: $name
22-
modelId: $modelId
21+
name: $name
22+
modelId: $modelId
2323
ontologyId: $ontologyId
2424
description: $description
2525
inferenceParams: $inferenceParams
@@ -89,6 +89,7 @@ def run_app(
8989
"classToSchemaId": app.class_to_schema_id,
9090
"inferenceParams": app.inference_params,
9191
"ontologyId": app.ontology_id,
92+
"modelAppId": app.id,
9293
}
9394

9495
data_rows_key = (

0 commit comments

Comments
 (0)