utils/attr_is_relation: add portfolio_type to relation set#176
Open
HenkKalkwater wants to merge 1 commit intomainfrom
Open
utils/attr_is_relation: add portfolio_type to relation set#176HenkKalkwater wants to merge 1 commit intomainfrom
HenkKalkwater wants to merge 1 commit intomainfrom
Conversation
/api/v1/portfolios/portfolio/ev-group/ returned `group_name` and `group_identifier` as numbers instead of strings. Other endpoints, like /api/v1/instruments/instrument/ev-group/ return strings correctly. These numerical values were then shown in the UI, as showcased in #149 (comment). By marking `portfolio_type` as a relation, it now correctly shows the names when invoking this API endpoint.
Contributor
Author
|
The frontend seems to rely on the back-end returning numbers, see:
|
HenkKalkwater
added a commit
to finmars-platform/finmars-portal
that referenced
this pull request
Feb 13, 2026
For portfolio types, the name is made up by looking at whatever the server returns for this group, assume the database is pristine and no one messed around with the portfolio types and changed ids. Previously, the server returned a number as the group name. That is not very helpful, so this is likely the reason this code existed in the first place. After finmars-platform/finmars-core#176 is merged, the server should return proper names, and this workaround should no longer be necessary.
Member
|
@paktusov @HenkKalkwater please check whats wrong with the tests |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
/api/v1/portfolios/portfolio/ev-group/ returned
group_nameandgroup_identifieras numbers instead of strings. Other endpoints, like /api/v1/instruments/instrument/ev-group/ return strings correctly. These numerical values were then shown in the UI, as showcased in #149 (comment).By marking
portfolio_typeas a relation, it now correctly shows the names when invoking this API endpoint.