Skip to content

Commit 99ede80

Browse files
authored
fix: in UserFromSearch field ip_phone, other_ip_phone from int to str (#491)
fix: in UserFromSearch field ip_phone, other_ip_phone from int to str
1 parent 8ba25aa commit 99ede80

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

pybotx/client/users_api/user_from_csv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class BotXAPIUserFromCSVResult(VerifiedPayloadBaseModel):
3333
description: Optional[str] = Field(alias="Description")
3434
phone: Optional[str] = Field(alias="Phone")
3535
other_phone: Optional[str] = Field(alias="Other phone")
36-
ip_phone: Optional[int] = Field(alias="IP phone")
37-
other_ip_phone: Optional[int] = Field(alias="Other IP phone")
36+
ip_phone: Optional[str] = Field(alias="IP phone")
37+
other_ip_phone: Optional[str] = Field(alias="Other IP phone")
3838
personnel_number: Optional[str] = Field(alias="Personnel number")
3939

4040
@validator(

pybotx/client/users_api/user_from_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ class BotXAPISearchUserResult(VerifiedPayloadBaseModel):
2222
user_kind: APIUserKinds
2323
active: Optional[bool] = None
2424
description: Optional[str] = None
25-
ip_phone: Optional[int] = None
25+
ip_phone: Optional[str] = None
2626
manager: Optional[str] = None
2727
office: Optional[str] = None
28-
other_ip_phone: Optional[int] = None
28+
other_ip_phone: Optional[str] = None
2929
other_phone: Optional[str] = None
3030
public_name: Optional[str] = None
3131
cts_id: Optional[UUID] = None

pybotx/models/users.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ class UserFromSearch:
4747
user_kind: UserKinds
4848
active: Optional[bool] = None
4949
description: Optional[str] = None
50-
ip_phone: Optional[int] = None
50+
ip_phone: Optional[str] = None
5151
manager: Optional[str] = None
5252
office: Optional[str] = None
53-
other_ip_phone: Optional[int] = None
53+
other_ip_phone: Optional[str] = None
5454
other_phone: Optional[str] = None
5555
public_name: Optional[str] = None
5656
cts_id: Optional[UUID] = None
@@ -106,6 +106,6 @@ class UserFromCSV:
106106
description: Optional[str] = None
107107
phone: Optional[str] = None
108108
other_phone: Optional[str] = None
109-
ip_phone: Optional[int] = None
110-
other_ip_phone: Optional[int] = None
109+
ip_phone: Optional[str] = None
110+
other_ip_phone: Optional[str] = None
111111
personnel_number: Optional[str] = None

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pybotx"
3-
version = "0.73.2"
3+
version = "0.73.3"
44
description = "A python library for interacting with eXpress BotX API"
55
authors = [
66
"Sidnev Nikolay <nsidnev@ccsteam.ru>",

tests/client/users_api/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ def user_from_search_with_data_json() -> Dict[str, Any]:
2323
"created_at": "2023-03-26T14:36:08.740618Z",
2424
"cts_id": "e0140f4c-4af2-5a2e-9ad1-5f37fceafbaf",
2525
"description": "Director in Owners dep",
26-
"ip_phone": 1271020,
26+
"ip_phone": "1271020",
2727
"manager": "Alice",
2828
"office": "SUN",
29-
"other_ip_phone": 32593,
30-
"other_phone": 1254218,
29+
"other_ip_phone": "32593",
30+
"other_phone": "1254218",
3131
"public_name": "Bobby",
3232
"rts_id": "f46440a4-d930-58d4-b3f5-8110ab846ee3",
3333
"updated_at": "2023-03-26T14:36:08.740618Z",
@@ -51,10 +51,10 @@ def user_from_search_with_data() -> UserFromSearch:
5151
created_at=convert_to_datetime("2023-03-26T14:36:08.740618Z"),
5252
cts_id=UUID("e0140f4c-4af2-5a2e-9ad1-5f37fceafbaf"),
5353
description="Director in Owners dep",
54-
ip_phone=1271020,
54+
ip_phone="1271020",
5555
manager="Alice",
5656
office="SUN",
57-
other_ip_phone=32593,
57+
other_ip_phone="32593",
5858
other_phone="1254218",
5959
public_name="Bobby",
6060
rts_id=UUID("f46440a4-d930-58d4-b3f5-8110ab846ee3"),

tests/client/users_api/test_users_as_csv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async def test__users_as_csv__succeed(
7373
status_code=HTTPStatus.OK,
7474
content=(
7575
b"HUID,AD Login,Domain,AD E-mail,Name,Sync source,Active,Kind,Company,Department,Position,Manager,Manager HUID,Personnel number,Description,IP phone,Other IP phone,Phone,Other phone,Avatar,Office,Avatar preview\n"
76-
b"dbc8934f-d0d7-4a9e-89df-d45c137a851c,test_user_17,cts.example.com,,test_user_17,ad,false,cts_user,Company,Department,Position,Manager John,13a6909c-bce1-4dbf-8359-efb7ef8e5b34,Some number,Description,123,321,Phone,Other_phone,Avatar,Office,Avatar_preview\n"
76+
b"dbc8934f-d0d7-4a9e-89df-d45c137a851c,test_user_17,cts.example.com,,test_user_17,ad,false,cts_user,Company,Department,Position,Manager John,13a6909c-bce1-4dbf-8359-efb7ef8e5b34,Some number,Description,IP phone,Other IP phone,Phone,Other_phone,Avatar,Office,Avatar_preview\n"
7777
b"13a6909c-bce1-4dbf-8359-efb7ef8e5b34,test_user_18,cts.example.com,,test_user_18,unsupported,true,cts_user,,,,,,,,,,,,,,"
7878
),
7979
),
@@ -107,8 +107,8 @@ async def test__users_as_csv__succeed(
107107
manager="Manager John",
108108
manager_huid=UUID("13a6909c-bce1-4dbf-8359-efb7ef8e5b34"),
109109
description="Description",
110-
ip_phone=123,
111-
other_ip_phone=321,
110+
ip_phone="IP phone",
111+
other_ip_phone="Other IP phone",
112112
phone="Phone",
113113
other_phone="Other_phone",
114114
avatar="Avatar",

0 commit comments

Comments
 (0)