Skip to content
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

[PORT] Tolerant null in LG context #1672

Closed
tomlm opened this issue Feb 6, 2020 · 0 comments · Fixed by #1785
Closed

[PORT] Tolerant null in LG context #1672

tomlm opened this issue Feb 6, 2020 · 0 comments · Fixed by #1785
Assignees
Labels
R8 Release 8 - March 16th, 2020
Milestone

Comments

@tomlm
Copy link
Contributor

tomlm commented Feb 6, 2020

Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#3329

close: #3326

Original issue:

# hello
- @{user.name}

Today if user.name is null, it will result an exception, we should change this to "null" (we can optimize the result later) so that user won't be interrupted by exceptions.

Expected result:

>if a == null or a.b == null, result would be string "null"
# template1
- @{a.b} 

> if a== null or a.b == null, result would be "result is 'null'"
# template2
- switch: @{a.b}
- CASE: @{'null'}
- result is 'null'

> if a template ref is return null, the result would be 
>{ "lgType":"MyStruct", "key1":"null"}
# template3
[MyStruct
    key1 = @{template4()}
]

> return null
# template4
- IF:@{false}
- hello 

Changed projects

  • Microsoft.Bot.Builder.LanguageGeneration
  • Microsoft.Bot.Builder.Dialogs.Adaptive.Templates.Tests
  • Microsoft.Bot.Builder.LanguageGeneration.Tests
@Danieladu Danieladu self-assigned this Feb 6, 2020
@Danieladu Danieladu added lg R8 Release 8 - March 16th, 2020 labels Feb 7, 2020
@munozemilio munozemilio added this to the R8 milestone Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R8 Release 8 - March 16th, 2020
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants