mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Use pre_execute signal to specify started vs queued
This commit is contained in:
@@ -622,7 +622,10 @@ class TasksViewSerializer(serializers.ModelSerializer):
|
||||
|
||||
def get_status(self, obj):
|
||||
if obj.attempted_task is None:
|
||||
return "incomplete"
|
||||
if obj.started:
|
||||
return "started"
|
||||
else:
|
||||
return "queued"
|
||||
elif obj.attempted_task.success:
|
||||
return "complete"
|
||||
elif not obj.attempted_task.success:
|
||||
|
Reference in New Issue
Block a user