Commit 9ca419e0 authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

pass value as email to AddWatcher when we couldn't load user

parent 06bee1c3
......@@ -317,7 +317,10 @@ sub GetCurrentUser {
$user->Load($text) unless $user->id;
my ( $val, $msg ) = $ticket_as_user->AddWatcher(
Type => $type,
PrincipalId => $user->PrincipalId,
$user->id
? (PrincipalId => $user->PrincipalId)
: (Email => $text)
,
);
push @{ $results{ 'Add'. $type } }, {
value => $text,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment