-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add attribute use_field_ids
to orm.Model.Meta
#355
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #355 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 25 25
Lines 2313 2320 +7
=========================================
+ Hits 2313 2320 +7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing a fix! I like this idea and I think it'll make the ORM more useful. I have a few suggestions below but otherwise I'm looking forward to adding this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good! The test seems to satisfy all the conditions we need to test, and it looks like we've maintained 100% coverage. A couple more pieces of feedback here, but nothing major.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you for contributing a new feature!
Resolves #351
Resolves #187
Adds wrapper
@modify_kwargs
that handles kwarg sanitization for:Model.all()
Model.first()
cell_format
andreturn_fields_by_field_id
are removed.If
Model.Meta.use_field_ids=True
, addsreturn_fields_by_field_id=True
to above function calls.I figure adding a dedicated wrapper is easier to read and is easier to manage if more sanitization is needed in the future.