|
|
|
@ -913,7 +913,7 @@ func BulkRemoveDocumentsHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
log.Printf("**** JOB %s: Total attachments gathered: %d", jobID, len(attachments)) |
|
|
|
|
|
|
|
if len(attachments) == 0 { |
|
|
|
log.Printf("**** JOB %s: No attachments found yet, trying direct paperwork endpoint") |
|
|
|
log.Printf("**** JOB %s: No attachments found yet, trying direct paperwork endpoint", jobID) |
|
|
|
|
|
|
|
// Directly try to get vendor bills using a specific endpoint
|
|
|
|
log.Printf("**** JOB %s: Trying vendor bill specific endpoint", jobID) |
|
|
|
@ -1263,7 +1263,7 @@ func BulkRemoveDocumentsHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
log.Printf("**** JOB %s: Final total attachments: %d", jobID, len(attachments)) |
|
|
|
|
|
|
|
if len(attachments) == 0 { |
|
|
|
log.Printf("**** JOB %s: WARNING! No attachments found after all retrieval attempts") |
|
|
|
log.Printf("**** JOB %s: WARNING! No attachments found after all retrieval attempts", jobID) |
|
|
|
} else { |
|
|
|
// Deduplicate again before continuing with deletion, in case multiple methods found the same attachments
|
|
|
|
originalCount := len(attachments) |
|
|
|
@ -1581,11 +1581,11 @@ func logAttachmentDetails(jobID string, attachment map[string]interface{}) { |
|
|
|
attachmentID = fmt.Sprintf("%.0f", id) |
|
|
|
} |
|
|
|
|
|
|
|
log.Printf("***** DETAILED ATTACHMENT %s *****", attachmentID) |
|
|
|
log.Printf("***** JOB %s - DETAILED ATTACHMENT %s *****", jobID, attachmentID) |
|
|
|
for key, value := range attachment { |
|
|
|
log.Printf(" %s = %v (type: %T)", key, value, value) |
|
|
|
log.Printf(" JOB %s: %s = %v (type: %T)", jobID, key, value, value) |
|
|
|
} |
|
|
|
log.Printf("***** END ATTACHMENT DETAILS *****") |
|
|
|
log.Printf("***** JOB %s - END ATTACHMENT DETAILS *****", jobID) |
|
|
|
} |
|
|
|
|
|
|
|
// Helper function to deduplicate attachments based on ID
|
|
|
|
|