Skip to content

Commit 6b0cf03

Browse files
Allow ints to be passed in as item IDs (#530)
1 parent ef5c2c2 commit 6b0cf03

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
---------------
55

6+
Next Release
7+
++++++++
8+
- Allow ints to be passed in as item IDs
9+
610
2.9.0 (2020-06-23)
711
++++++++
812
- Fix exception handling for OAuth

boxsdk/object/item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,12 +752,12 @@ def validate_item_id(item_id):
752752
753753
:param item_id:
754754
:type item_id:
755-
`str`
755+
`str` or `int`
756756
:raises:
757757
BoxException: if item_id is not numeric
758758
:returns:
759759
:rtype:
760760
None
761761
"""
762-
if not item_id.isdigit():
762+
if not isinstance(item_id, int) and not item_id.isdigit():
763763
raise BoxValueError("Invalid item ID")

0 commit comments

Comments
 (0)