|
@@ -167,7 +167,7 @@ namespace TEAMModelBI.Controllers
|
|
if (string.IsNullOrEmpty(item.tmdId))
|
|
if (string.IsNullOrEmpty(item.tmdId))
|
|
{
|
|
{
|
|
var coreUser = await _coreAPIHttpService.GetUserInfo(new Dictionary<string, string> { { "key", $"{item.mobile}" } }, _option.Location, _configuration);
|
|
var coreUser = await _coreAPIHttpService.GetUserInfo(new Dictionary<string, string> { { "key", $"{item.mobile}" } }, _option.Location, _configuration);
|
|
- if (coreUser.id != null)
|
|
|
|
|
|
+ if (coreUser != null && coreUser.id != null)
|
|
{
|
|
{
|
|
item.tmdId = coreUser.id;
|
|
item.tmdId = coreUser.id;
|
|
item.tmdName = coreUser.name;
|
|
item.tmdName = coreUser.name;
|
|
@@ -249,7 +249,7 @@ namespace TEAMModelBI.Controllers
|
|
if (!string.IsNullOrEmpty($"{ddUserInfo.mobile}"))
|
|
if (!string.IsNullOrEmpty($"{ddUserInfo.mobile}"))
|
|
{
|
|
{
|
|
var coreUser = await _coreAPIHttpService.GetUserInfo(new Dictionary<string, string> { { "key", $"{ddUserInfo.mobile}" } }, _option.Location, _configuration);
|
|
var coreUser = await _coreAPIHttpService.GetUserInfo(new Dictionary<string, string> { { "key", $"{ddUserInfo.mobile}" } }, _option.Location, _configuration);
|
|
- if (coreUser.id != null) {
|
|
|
|
|
|
+ if (coreUser != null && coreUser.id != null) {
|
|
|
|
|
|
ddUserInfo.tmdId = coreUser.id;
|
|
ddUserInfo.tmdId = coreUser.id;
|
|
ddUserInfo.tmdName = coreUser.name;
|
|
ddUserInfo.tmdName = coreUser.name;
|
|
@@ -380,7 +380,7 @@ namespace TEAMModelBI.Controllers
|
|
{
|
|
{
|
|
|
|
|
|
var coreUser = await _coreAPIHttpService.GetUserInfo(new Dictionary<string, string> { { "key", $"{mobile}" } }, _option.Location, _configuration);
|
|
var coreUser = await _coreAPIHttpService.GetUserInfo(new Dictionary<string, string> { { "key", $"{mobile}" } }, _option.Location, _configuration);
|
|
- if (coreUser.id != null)
|
|
|
|
|
|
+ if (coreUser != null && coreUser.id != null)
|
|
{
|
|
{
|
|
itemUser.tmdId = coreUser.id;
|
|
itemUser.tmdId = coreUser.id;
|
|
itemUser.tmdName = coreUser.name;
|
|
itemUser.tmdName = coreUser.name;
|
|
@@ -496,7 +496,7 @@ namespace TEAMModelBI.Controllers
|
|
else
|
|
else
|
|
{
|
|
{
|
|
var coreUser = await _coreAPIHttpService.GetUserInfo(new Dictionary<string, string> { { "key", $"{moile}" } }, _option.Location, _configuration);
|
|
var coreUser = await _coreAPIHttpService.GetUserInfo(new Dictionary<string, string> { { "key", $"{moile}" } }, _option.Location, _configuration);
|
|
- if (coreUser.id != null)
|
|
|
|
|
|
+ if (coreUser != null && coreUser.id != null)
|
|
{
|
|
{
|
|
itemUser.tmdId = coreUser.id;
|
|
itemUser.tmdId = coreUser.id;
|
|
itemUser.tmdName = coreUser.name;
|
|
itemUser.tmdName = coreUser.name;
|