Skip to content

Commit

Permalink
fix: allow object result case message to be null (#2024)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedlicska authored Feb 8, 2024
1 parent 549da15 commit 001992a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const { items } = useInjectedViewerRequestedResources()
type ObjectResult = {
category: string
objectIds: string[]
message: string
message: string | null
level: 'ERROR' | 'WARNING' | 'INFO'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{{ result.category }}: {{ result.objectIds.length }} affected elements
</div>
</div>
<div class="text-xs text-foreground-2 pl-5">
<div v-if="result.message" class="text-xs text-foreground-2 pl-5">
{{ result.message }}
</div>
</button>
Expand All @@ -41,7 +41,7 @@ import type { NumericPropertyInfo } from '@speckle/viewer'
type ObjectResultWithOptionalMetadata = {
category: string
objectIds: string[]
message: string
message: string | null
level: 'ERROR' | 'WARNING' | 'INFO'
metadata?: {
gradient?: boolean
Expand Down
2 changes: 1 addition & 1 deletion packages/server/modules/automations/helpers/inputTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ObjectResultLevelEnum = z.enum(ObjectResultLevel)

const ObjectResultValuesSchema = z.object({
level: ObjectResultLevelEnum,
message: z.string(),
message: z.string().nullable(),
category: z.string(),
objectIds: z.string().array().nonempty(),
metadata: z.record(z.string(), z.unknown()).nullable(),
Expand Down

0 comments on commit 001992a

Please sign in to comment.