Skip to content

Commit

Permalink
Fix for api change in auto entry extraction status
Browse files Browse the repository at this point in the history
  • Loading branch information
subinasr authored and AdityaKhatri committed Dec 21, 2023
1 parent f6412ec commit 3235ac2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/views/EntryEdit/LeftPane/AutoEntriesModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ const AUTO_DRAFT_ENTRIES_STATUS = gql`
) {
project(id: $projectId) {
id
assistedTagging {
extractionStatusByLead(leadId: $leadId) {
autoEntryExtractionStatus
}
lead(
id: $leadId,
) {
autoEntryExtractionStatus
}
}
}
Expand Down Expand Up @@ -481,7 +481,7 @@ function AutoEntriesModal(props: Props) {
notifyOnNetworkStatusChange: true,
onCompleted: (response) => {
const status = response?.project
?.assistedTagging?.extractionStatusByLead?.autoEntryExtractionStatus;
?.lead?.autoEntryExtractionStatus;
if (status === 'SUCCESS') {
setDraftEntriesLoading(false);
}
Expand All @@ -490,11 +490,11 @@ function AutoEntriesModal(props: Props) {
);

const extractionStatus = autoEntryExtractionStatus?.project
?.assistedTagging?.extractionStatusByLead?.autoEntryExtractionStatus;
?.lead?.autoEntryExtractionStatus;

useEffect(() => {
const extractionStatusInternal = autoEntryExtractionStatus?.project
?.assistedTagging?.extractionStatusByLead?.autoEntryExtractionStatus;
?.lead?.autoEntryExtractionStatus;

const shouldPoll = extractionStatusInternal === 'PENDING' || extractionStatusInternal === 'STARTED';
if (shouldPoll) {
Expand Down

0 comments on commit 3235ac2

Please sign in to comment.