-
Notifications
You must be signed in to change notification settings - Fork 29
Bug: /myfunc endpoint crashes with TypeError #44
Copy link
Copy link
Open
Description
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 → TypeErrorHow 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
- Pass the zippedFile argument when instantiating Download in /myfunc (line 200)
- /myfunc responds with a ZIP file or appropriate error message instead of crashing
- /backupCase endpoint continues to work as before
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels