populationgenomics / seqr

web-based analysis tool for rare disease genomics
GNU Affero General Public License v3.0
3 stars 1 forks source link

Sa sync fix #221

Closed EddieLF closed 1 month ago

EddieLF commented 1 month ago

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

"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:


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.