-
Notifications
You must be signed in to change notification settings - Fork 18
Fix private model import logic #3032
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
base: main
Are you sure you want to change the base?
Conversation
| export async function getModelByIdNoAuth(modelId: string, kind?: EntryKindKeys): Promise<ModelDoc> { | ||
| const model = await ModelModel.findOne({ | ||
| id: modelId, | ||
| ...(kind && { kind }), |
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.
is kind necessary?
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.
Yes - this is used by the getModel endpoint https://github.com/gchq/Bailo/blob/main/backend/src/routes/v2/model/getModel.ts
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.
Ah, I see. As "ModelModel" is really EntryModel. I assume there is a condition in which two entries could have same id, but different kind to distinguish them? If not, and no two entries can have the same id, do we need kind for searching the "models"?
No description provided.