Skip to content

Commit 106c3d3

Browse files
committed
update to error messaging
1 parent a1a7998 commit 106c3d3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

labelbox/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,14 +1010,15 @@ def assign_global_keys_to_data_rows(
10101010
if res["assignGlobalKeysToDataRowsResult"][
10111011
"jobStatus"] == "COMPLETE":
10121012
errors = []
1013-
res = res['assignGlobalKeysToDataRowsResult']
1014-
if res['invalidGlobalKeyAssignments'] is not None:
1013+
res = res['assignGlobalKeysToDataRowsResult']['data']
1014+
print(res)
1015+
if res['invalidGlobalKeyAssignments']:
10151016
errors.append("Invalid Global Keys: " +
10161017
str(res['invalidGlobalKeyAssignments']))
1017-
if res['unmodifiedAssignments'] is not None:
1018+
if res['unmodifiedAssignments']:
10181019
errors.append("Unmodified Assignments: " +
10191020
str(res['unmodifiedAssignments']))
1020-
if res['accessDeniedAssignments'] is not None:
1021+
if res['accessDeniedAssignments']:
10211022
errors.append("Access Denied Assignments: " +
10221023
str(res['accessDeniedAssignments']))
10231024
if len(errors) > 0:

0 commit comments

Comments
 (0)