Skip to content

Commit 9c0a174

Browse files
authored
Merge pull request #1555 from the-deep/fix/update-draft-entry-status
Update status of draft entry
2 parents e3c2eae + d730957 commit 9c0a174

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/deepl_integration/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,10 +1376,10 @@ def save_data(cls, lead, data_url):
13761376
project=lead.project,
13771377
lead=lead,
13781378
excerpt=model_preds['text'],
1379-
prediction_status=DraftEntry.PredictionStatus.STARTED,
1379+
prediction_status=DraftEntry.PredictionStatus.DONE,
13801380
type=DraftEntry.Type.AUTO
13811381
)
1382-
if model_preds['geolocations']:
1382+
if model_preds.get('geolocations'):
13831383
geo_areas_qs = GeoAreaGqlFilterSet(
13841384
data={'titles': [geo['entity'] for geo in model_preds['geolocations']]},
13851385
queryset=GeoArea.get_for_project(lead.project)

0 commit comments

Comments
 (0)