Skip to content

Commit

Permalink
fix(lib-classifier): work-in-progress warning for new text subjects
Browse files Browse the repository at this point in the history
The text-from-subject task warns about work-in-progress for every subject. This fixes that by setting the annotation value without marking the annotation as in-progress.
  • Loading branch information
eatyourgreens committed Jan 8, 2025
1 parent fd585a1 commit 1e7b48f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const TextFromSubject = types
return {
updateFromSubject (value) {
self.initializedFromSubject = true
self.update(value)
self.value = value
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ describe('Model > TextFromSubjectAnnotation', function () {
it('should have initializedFromSubject of true', function () {
expect(textFromSubjectAnnotation.initializedFromSubject).to.be.true()
})

it('should not be marked as modified', function () {
expect(textFromSubjectAnnotation._inProgress).to.be.false()
})
})

describe('with initial update from subject content and valid update from user', function () {
Expand Down

0 comments on commit 1e7b48f

Please sign in to comment.