Skip to content

Schema: Mark nullable fields - #9546

Merged
SchrodingersGat merged 4 commits into
inventree:masterfrom
1337joe:schema-unrequire
Apr 21, 2025
Merged

SchrodingersGat merged 4 commits into
inventree:masterfrom
1337joe:schema-unrequire

Conversation

@1337joe

@1337joe 1337joe commented Apr 20, 2025

Copy link
Copy Markdown
Contributor

Added allow_null=True to the rest of the required fields that my tests found to be null in the demo dataset.

Note: required=False has no effect on read_only fields, but fields that are both read_only and allow_null get removed from the required list by the schema post-processing hook.

Also changed the InfoView default_locale serializer to be a plain string because the default en_us didn't match en from LOCALE_CODES and was causing deserialization errors.

Closes #9045

@netlify

netlify Bot commented Apr 20, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 352cf09
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/6805b098ee643e0008a387dd
😎 Deploy Preview https://deploy-preview-9546--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97 (no change from production)
Accessibility: 89 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov

codecov Bot commented Apr 20, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.32%. Comparing base (1dae1bc) to head (352cf09).
Report is 282 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9546      +/-   ##
==========================================
- Coverage   86.35%   86.32%   -0.03%     
==========================================
  Files        1229     1229              
  Lines       54042    54109      +67     
  Branches     2280     2280              
==========================================
+ Hits        46668    46711      +43     
- Misses       6797     6821      +24     
  Partials      577      577              
Flag Coverage Δ
backend 88.32% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat

Copy link
Copy Markdown
Member

@1337joe thanks for the continued improvements :)

@SchrodingersGat
SchrodingersGat merged commit 0de8e61 into inventree:master Apr 21, 2025
@1337joe
1337joe deleted the schema-unrequire branch April 22, 2025 02:53
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.

OpenAPI schema doesn't match data returned from the server

2 participants