File tree Expand file tree Collapse file tree
packages/foundation/plugin-formula/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,7 +137,12 @@ export class FormulaPlugin implements RuntimePlugin {
137137 const schemaItem = this . kernel . metadata ?. get ?.( 'object' , objectName )
138138 ?? ( typeof this . kernel . getObject === 'function' ? this . kernel . getObject ( objectName ) : undefined ) ;
139139 const schema = schemaItem ?. content || schemaItem ;
140- if ( ! schema || ! schema . fields ) return ;
140+ if ( ! schema || ! schema . fields ) {
141+ if ( objectName ) {
142+ this . logger . debug ( 'No schema found for object, skipping formula evaluation' , { objectName } ) ;
143+ }
144+ return ;
145+ }
141146
142147 // Identify formula fields
143148 const formulaFields : [ string , any ] [ ] = [ ] ;
@@ -168,7 +173,7 @@ export class FormulaPlugin implements RuntimePlugin {
168173 record,
169174 system : systemInfo ,
170175 current_user : {
171- id : session ?. userId || '' ,
176+ id : session ?. userId || session ?. id || '' ,
172177 name : session ?. name ,
173178 email : session ?. email ,
174179 role : session ?. roles ?. [ 0 ]
You can’t perform that action at this time.
0 commit comments