Add in the required project argument to the validate_fam_file_records call to prevent the error seen when attempting to sync "individuals" (a pedigree).
"validate_fam_file_records() missing 1 required positional argument: 'records'",
"user": "sample-metadata-api@sample-metadata.iam.gserviceaccount.com",
"traceback": "Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/app/seqr/seqr/views/utils/permissions_utils.py", line 95, in __call__
return self.func(*args, **kwargs)
File "/app/seqr/seqr/views/utils/permissions_utils.py", line 111, in _check_user_func
return _wrapped_func(request, *args, **kwargs)
File \"/app/seqr/seqr/views/apis/individual_api.py\", line 1043, in sa_sync_individuals
warnings = validate_fam_file_records(json_records)
TypeError: validate_fam_file_records() missing 1 required positional argument: 'records'
To replicate:
Attempt to POST to http://seqr.populationgenomics.org.au/api/project/sa/<PROJECT_GUID>/individuals/sync
(most easily done via Metamist project page, click sync and then uncheck all boxes except "sync pedigree")
requestBody is well formed, but the API logic triggers the above error
During the merge I must have missed this change. It's the only instance I can see where this happens. I'll make sure this change is merged into staging/dev too.
Add in the required project argument to the
validate_fam_file_records
call to prevent the error seen when attempting to sync "individuals" (a pedigree).See VM log entry
To replicate:
http://seqr.populationgenomics.org.au/api/project/sa/<PROJECT_GUID>/individuals/sync
(most easily done via Metamist project page, click sync and then uncheck all boxes except "sync pedigree")The change to have project in the required args was added upstream 2 months ago. https://github.com/populationgenomics/seqr/blob/main/seqr/views/utils/pedigree_info_utils.py#L241
During the merge I must have missed this change. It's the only instance I can see where this happens. I'll make sure this change is merged into staging/dev too.