-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix: use proper reference for related model id #10170
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
Conversation
Signed-off-by: mertmit <mertmit99@gmail.com>
📝 WalkthroughWalkthroughThis pull request introduces modifications to two files: Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/nocodb/src/models/Column.ts (1)
1557-1557: Ensure type safety before casting to LinksColumn.While this type assertion helps us access
fk_related_model_id, iflinkColcan be anything other than aLinksColumnat runtime, this cast may lead to issues in production. Consider performing a runtime check or implementing a type guard to confirm thatlinkColis indeed aLinksColumnbefore casting.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/nocodb-sdk/src/lib/Api.ts(10 hunks)packages/nocodb/src/models/Column.ts(1 hunks)
🔇 Additional comments (3)
packages/nocodb-sdk/src/lib/Api.ts (3)
8216-8217: LGTM: Added getHiddenColumns parameter consistentlyThe addition of
getHiddenColumnsparameter to list methods is consistent and provides good flexibility for fetching hidden columns when needed.Also applies to: 9090-9090
8259-8262: LGTM: Added record manipulation parametersThe addition of
beforeandundoparameters to create/bulkCreate methods provides useful functionality for:
- Positioning records using
beforeparameter- Supporting undo operations using
undoparameterThe implementation is consistent across different methods.
Also applies to: 8607-8609, 9133-9136, 12170-12171
12313-12349: LGTM: Added record move functionalityThe new move method is well-implemented with:
- Clear documentation
- Proper typing
- Consistent parameter naming (
beforeparameter matches create methods)- Returns proper response type
This provides good functionality for record reordering.
Uffizzi Ephemeral Environment Deploying☁️ https://app.uffizzi.com/github.com/nocodb/nocodb/pull/10170 ⚙️ Updating now by workflow run 12581671859. What is Uffizzi? Learn more! |
Change Summary
We are listing from MetaTable.COL_RELATIONS which is colOptions itself so we should directly access the required prop.
Issue pointed & fix provided by https://github.com/gaurav-peswani-truva
Ref: #9728 (comment)
Change type