Spaces:
Runtime error
Runtime error
ViolaMeier commited on
Commit ·
eb86477
1
Parent(s): 0453879
feat: added email to check user identification
Browse files- src/models.py +2 -0
- src/nodes/identify_user.py +2 -1
src/models.py
CHANGED
|
@@ -16,6 +16,8 @@ class ExtractedTicket(TypedDict):
|
|
| 16 |
title: str | None = None
|
| 17 |
ticket_num: int | None = None
|
| 18 |
ticket_description: str | None = None
|
|
|
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
class TicketState(TypedDict):
|
|
|
|
| 16 |
title: str | None = None
|
| 17 |
ticket_num: int | None = None
|
| 18 |
ticket_description: str | None = None
|
| 19 |
+
ticket_type_name: str | None = None
|
| 20 |
+
ticket_type_code: str | None = None
|
| 21 |
|
| 22 |
|
| 23 |
class TicketState(TypedDict):
|
src/nodes/identify_user.py
CHANGED
|
@@ -25,7 +25,8 @@ def identify_user(state: TicketState):
|
|
| 25 |
if (
|
| 26 |
(has_name_info and
|
| 27 |
(user_info.get("first_name") or "").lower() == first_name and
|
| 28 |
-
(user_info.get("last_name") or "").lower() == last_name
|
|
|
|
| 29 |
or
|
| 30 |
(has_contract_number and
|
| 31 |
(user_info.get("contract_number") or "").strip() == contract_number)
|
|
|
|
| 25 |
if (
|
| 26 |
(has_name_info and
|
| 27 |
(user_info.get("first_name") or "").lower() == first_name and
|
| 28 |
+
(user_info.get("last_name") or "").lower() == last_name and
|
| 29 |
+
(user_info.get("email") or "").lower() == email)
|
| 30 |
or
|
| 31 |
(has_contract_number and
|
| 32 |
(user_info.get("contract_number") or "").strip() == contract_number)
|