-
Notifications
You must be signed in to change notification settings - Fork 3
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
DRY common response object database fields #107
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c2a7b79
Create ObjectMixin and beginning work on applying it
rmarow f30a7cb
Update macro name
rmarow 5b4ea9d
WIP applying mixin to data product
rmarow f305228
Merge branch 'main' into update_response_objects
rmarow 8aa1c26
WIP application fields update
rmarow 2124e30
Fix spelling error
rmarow c0e32cd
Update role_id to role based on form change (bugfix)
rmarow 9cd0a45
Update website_url to just website
rmarow 7b510a8
Update name -> short_name
rmarow 91c4993
Create list for relatioship fields
rmarow e53c974
Name -> short_name cont.
rmarow 99dc8ec
Final spot for name -> short_name
rmarow 69180f2
Update list of fields
rmarow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
maybe
common_response_object_fields
?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.
Also, is there a way we can generate this list from the mixin class? There are many ways to get the "fields" out of a class, but they're all pretty messy. We could make
ResponseObjectFieldMixin
a pydantic class, and then I think we have more intuitive access to its fields. Or we could use one of these methods:https://stackoverflow.com/questions/9058305/getting-attributes-of-a-class
I don't feel we need to address this in this PR, except to leave a comment for future us that some DRYing needs to be done.