Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with document endpoints being too restrictive #21

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

diversemix
Copy link
Contributor

@diversemix diversemix commented Oct 16, 2023

Description

Various properties of the pydantic response definition were too restrictive - not allowing for NULLs

Background

From the schema:

                     Table "public.family_document"
        Column        |      Type      | Collation | Nullable | Default 
----------------------+----------------+-----------+----------+---------
 family_import_id     | text           |           | not null | 
 physical_document_id | integer        |           | not null | 
 import_id            | text           |           | not null | 
 variant_name         | text           |           |          | 
 document_status      | documentstatus |           | not null | 
 document_type        | text           |           |          | 
 document_role        | text           |           |          | 

                               Table "public.physical_document"
    Column    |  Type   | Collation | Nullable |                    Default                    
--------------+---------+-----------+----------+-----------------------------------------------
 id           | integer |           | not null | nextval('physical_document_id_seq'::regclass)
 title        | text    |           | not null | 
 md5_sum      | text    |           |          | 
 source_url   | text    |           |          | 
 content_type | text    |           |          | 
 cdn_object   | text    |           |          | 

Type of change

Please select the option(s) below that are most relevant:

  • Bug fix
  • New feature
  • Breaking change

How Has This Been Tested?

Please describe the tests that you added to verify your changes.

Reviewer Checklist

  • The PR represents a single feature (small driveby fixes are also ok)
  • The PR includes tests that are sufficient for the level of risk
  • The code is sufficiently commented, particularly in hard-to-understand areas
  • Any required documentation updates have been made
  • Any TODOs added are captured in future tickets
  • No FIXMEs remain

@diversemix diversemix requested a review from katybaulch October 16, 2023 16:33
Copy link
Contributor

@katybaulch katybaulch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Config change may not be necessary, but doesn't affect the source code so nothing stopping merging.

@diversemix diversemix merged commit 79382dc into main Oct 16, 2023
2 checks passed
@diversemix diversemix deleted the fix-doc-endpoints branch October 16, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants