mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	fix an issue with upload status identification
This commit is contained in:
		@@ -43,10 +43,10 @@ export class FileStatus {
 | 
				
			|||||||
  updateProgress(status: FileStatusPhase, currentProgress?: number, maxProgress?: number) {
 | 
					  updateProgress(status: FileStatusPhase, currentProgress?: number, maxProgress?: number) {
 | 
				
			||||||
    if (status >= this.phase) {
 | 
					    if (status >= this.phase) {
 | 
				
			||||||
      this.phase = status
 | 
					      this.phase = status
 | 
				
			||||||
      if (currentProgress != undefined) {
 | 
					      if (currentProgress != null) {
 | 
				
			||||||
        this.currentPhaseProgress = currentProgress
 | 
					        this.currentPhaseProgress = currentProgress
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (maxProgress) {
 | 
					      if (maxProgress != null) {
 | 
				
			||||||
        this.currentPhaseMaxProgress = maxProgress
 | 
					        this.currentPhaseMaxProgress = maxProgress
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -70,7 +70,7 @@ export class ConsumerStatusService {
 | 
				
			|||||||
  private documentConsumptionFailedSubject = new Subject<FileStatus>()
 | 
					  private documentConsumptionFailedSubject = new Subject<FileStatus>()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private get(taskId: string, filename?: string) {
 | 
					  private get(taskId: string, filename?: string) {
 | 
				
			||||||
    let status = this.consumerStatus.find(e => e.taskId == taskId) || this.consumerStatus.find(e => e.filename == filename)
 | 
					    let status = this.consumerStatus.find(e => e.taskId == taskId) || this.consumerStatus.find(e => e.filename == filename && e.taskId == null)
 | 
				
			||||||
    if (!status) {
 | 
					    if (!status) {
 | 
				
			||||||
      status = new FileStatus()
 | 
					      status = new FileStatus()
 | 
				
			||||||
      this.consumerStatus.push(status)
 | 
					      this.consumerStatus.push(status)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user