Skip to content

Commit fbf1933

Browse files
committed
Ensure string represenation of all user data in 'get_id_and_update_user'
Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
1 parent 3307b1d commit fbf1933

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

issue_processing/issue_processing.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,10 @@ def get_user_string(name, email):
687687

688688
def get_id_and_update_user(user, buffer_db_ids=user_id_buffer, buffer_usernames=username_id_buffer):
689689

690-
# fix encoding for name and e-mail address
691-
name = user["name"] if "name" in user else str(user["username"])
692-
mail = user["email"] # empty
690+
# ensure string representation for name and e-mail address
691+
username = str(user["username"])
692+
name = str(user["name"]) if "name" in user else username
693+
mail = str(user["email"])
693694

694695
# construct string for ID service and send query
695696
user_string = get_user_string(name, mail)

issue_processing/jira_issue_processing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,9 +608,9 @@ def get_user_string(name, email):
608608

609609
def get_id_and_update_user(user, buffer_db_ids=user_id_buffer):
610610

611-
# fix encoding for name and e-mail address
612-
name = user["name"] if "name" in user else str(user["username"])
613-
mail = user["email"]
611+
# ensure string representation for name and e-mail address
612+
name = str(user["name"]) if "name" in user else str(user["username"])
613+
mail = str(user["email"]) # may be empty
614614

615615
# construct string for ID service and send query
616616
user_string = get_user_string(name, mail)

0 commit comments

Comments
 (0)