mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-03 12:10:59 +00:00
Add new global setting to control auto-upload of test reports (#3137)
* Add new global setting to control auto-upload of test reports * Adds callback to attach a copy of the test report when printing * Fix for all attachment API endpoints - The AttachmentMixin must come first! - User was not being set, as the custom 'perform_create' function was never called * Remove duplicated UserSerializer * display uploading user in attachment table * Add unit test to check the test report is automatically uploaded
This commit is contained in:
@ -20,9 +20,9 @@ def delete_scheduled(apps, schema_editor):
|
||||
|
||||
items = StockItem.objects.filter(scheduled_for_deletion=True)
|
||||
|
||||
logger.info(f"Removing {items.count()} stock items scheduled for deletion")
|
||||
|
||||
items.delete()
|
||||
if items.count() > 0:
|
||||
logger.info(f"Removing {items.count()} stock items scheduled for deletion")
|
||||
items.delete()
|
||||
|
||||
Task = apps.get_model('django_q', 'schedule')
|
||||
|
||||
|
Reference in New Issue
Block a user