Skip to content

Commit

Permalink
Stricter model ID validation
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Jun 27, 2024
1 parent 8ee10fb commit 3457a36
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/validate-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const validateModel = (
const report = (message: string, fix?: () => Promise<void>) =>
errors.push({ message: `Model ${modelId}: ${message}`, fix });

if (modelId.startsWith(`${model.scale}x`)) {
if (modelId.startsWith(`${model.scale}x-`)) {
const expected = canonicalizeModelId(modelId);
if (expected !== modelId) {
report(`Model ID should be ${expected}`, () => api.models.changeId(modelId, expected));
Expand Down

0 comments on commit 3457a36

Please sign in to comment.