Description
The /myfunc endpoint (used for case backup) crashes when accessed. The root cause appears to be a constructor argument mismatch: the Download class constructor expects two arguments but is called with only one.
Why This Matters
- Any attempt to use the backup/export feature crashes the server
- Users cannot export their cases
- This endpoint is currently non-functional
Location
File: API/Routes/Upload/UploadRoute.py
Lines:** 197–203
Current Code (Problem)
class Download(Thread):
def __init__(self, request, zippedFile): # Expects 2 args
...
However, it is instantiated as:
thread_a = Download(request.__copy__()) # Only 1 arg passed → TypeError
How to Reproduce
Make a GET request to /myfunc
Observe server error: TypeError: init() missing 1 required positional argument: 'zippedFile'
Expected Behavior
/myfunc should work like /backupCase (which correctly passes 2 arguments)
Server should not crash; user should receive a valid ZIP response
Acceptance Criteria
Description
The
/myfuncendpoint (used for case backup) crashes when accessed. The root cause appears to be a constructor argument mismatch: theDownloadclass constructor expects two arguments but is called with only one.Why This Matters
Location
File:
API/Routes/Upload/UploadRoute.pyLines:** 197–203
Current Code (Problem)
However, it is instantiated as:
How to Reproduce
Make a GET request to /myfunc
Observe server error: TypeError: init() missing 1 required positional argument: 'zippedFile'
Expected Behavior
/myfunc should work like /backupCase (which correctly passes 2 arguments)
Server should not crash; user should receive a valid ZIP response
Acceptance Criteria