jira: Fix warnings

This commit is contained in:
Aurélien LAJOIE 2021-10-15 17:57:03 +02:00
parent 173ef2fab3
commit 9c36f8acb5
No known key found for this signature in database
GPG Key ID: B843917229D6F3CE
1 changed files with 4 additions and 5 deletions

View File

@ -168,12 +168,11 @@ local function worker(user_args)
local cur_status = '' local cur_status = ''
for _, issue in ipairs(result.issues) do for _, issue in ipairs(result.issues) do
local path_to_avatar = HOME_DIR ..'/.cache/awmw/jira-widget/avatars/' .. issue.fields.assignee.name or issue.fields.assignee.displayName local name
local name = ''
if issue.fields.assignee.name == nil then if issue.fields.assignee.name == nil then
name = issue.fields.assignee.displayName name = issue.fields.assignee.displayName
else else
name = issue.fields.assignee.name name = issue.fields.assignee.name
end end
local path_to_avatar = HOME_DIR ..'/.cache/awmw/jira-widget/avatars/' .. name local path_to_avatar = HOME_DIR ..'/.cache/awmw/jira-widget/avatars/' .. name