cubewise-code / bedrock

Bedrock is TM1 Best Practice assets built from years of TM1 experience
Other
79 stars 74 forks source link

Chore user not handled when getting user caption in server.executecommand #370

Closed lotsaram closed 1 year ago

lotsaram commented 1 year ago

Describe the bug cUserName = AttrS('}Clients', cUser, '}TM1_DefaultDisplayValue'); on Prolog 32 causes error as there is no check that element exists in }Clients (for example in the case of a scheduled chore).

Expected behavior Replace with

cUserName = '';
If( DimIx('}Clients', cUser) > 0 );
    cUserName = AttrS('}Clients', cUser, '}TM1_DefaultDisplayValue');
EndIf;
cUserName = IF( cUserName @<> '', cUserName, 'ADMIN' );