diff --git a/ckanext/odsh/pdf_to_thumbnail/enqueue.py b/ckanext/odsh/pdf_to_thumbnail/enqueue.py
index 3dc7a1d56a2b88bdd9531dcb15368aecb9515f77..0c25ad9b011057aa9fb84bdbe08069b4bf1d331b 100644
--- a/ckanext/odsh/pdf_to_thumbnail/enqueue.py
+++ b/ckanext/odsh/pdf_to_thumbnail/enqueue.py
@@ -22,14 +22,12 @@ def enqueue_after_update(context, resource):
     create_thumbnail_for_last_resource(resources, private, package_id)
 
 def enqueue_after_delete(context, resources):
-    if len(resources) > 0:
-        package = context.get('package')
-        private = package.private
-        package_id = package.id
-        first_resource = resources[0]
-        
-        # without the background job
-        create_thumbnail_for_last_resource(resources, private, package_id)
+    package = context.get('package')
+    private = package.private
+    package_id = package.id
+            
+    # without the background job
+    create_thumbnail_for_last_resource(resources, private, package_id)