File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,11 @@ def tokenize_calculated_attribute(
57
57
tokenization_cancelled = False
58
58
for idx , chunk in enumerate (chunks ):
59
59
record_tokenization_task = tokenization .get (project_id , task_id )
60
- if record_tokenization_task .state == enums .TokenizerTask .STATE_FAILED .value :
60
+ if (
61
+ not record_tokenization_task
62
+ or record_tokenization_task .state
63
+ == enums .TokenizerTask .STATE_FAILED .value
64
+ ):
61
65
tokenization_cancelled = True
62
66
break
63
67
values = [
@@ -135,7 +139,11 @@ def tokenize_initial_project(
135
139
tokenization_cancelled = False
136
140
for idx , record_chunk in enumerate (chunks ):
137
141
record_tokenization_task = tokenization .get (project_id , task_id )
138
- if record_tokenization_task .state == enums .TokenizerTask .STATE_FAILED .value :
142
+ if (
143
+ not record_tokenization_task
144
+ or record_tokenization_task .state
145
+ == enums .TokenizerTask .STATE_FAILED .value
146
+ ):
139
147
tokenization_cancelled = True
140
148
break
141
149
entries = []
You can’t perform that action at this time.
0 commit comments