This repository was archived by the owner on May 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
This repository was archived by the owner on May 28, 2025. It is now read-only.
**kwargs computer match search not working #104
Copy link
Copy link
Open
Description
according to the documentation adding a * to a computer search will preform a match search
The computer name that Im searching for is MC305239-LT-42CTS so in my code as a match search Im searching for MC305239*
expected url: https://my-jamf-site.jamfcloud.com:8443/JSSResource/computers/match/MC305239*
computer = j.Computer('MC305239*')
print(computer)
which returns
Traceback (most recent call last):
File "python-jss.py", line 12, in <module>
print(computer)
File "/Users/mat2159279/.pyenv/versions/3.8.5/lib/python3.8/site-packages/jss/queryset.py", line 104, in __str__
table = [
File "/Users/mat2159279/.pyenv/versions/3.8.5/lib/python3.8/site-packages/jss/queryset.py", line 105, in <listcomp>
fmt.format(data=item._basic_identity, cached=str_cached(item)) for
TypeError: unsupported format string passed to NoneType.__format__
If I remove the MC from the front of the computer name it returns a blank table
Empty QuerySet
---------------------
| id | name| cached |
---------------------
---------------------
At that point I should be pacing another * in front of the name
expected url: https://my-jamf-site.jamfcloud.com:8443/JSSResource/computers/match/*305239*
But if I do place another * in front I get
Traceback (most recent call last):
File "python-jss.py", line 12, in <module>
print(computer)
File "/Users/mat2159279/.pyenv/versions/3.8.5/lib/python3.8/site-packages/jss/queryset.py", line 104, in __str__
table = [
File "/Users/mat2159279/.pyenv/versions/3.8.5/lib/python3.8/site-packages/jss/queryset.py", line 105, in <listcomp>
fmt.format(data=item._basic_identity, cached=str_cached(item)) for
TypeError: unsupported format string passed to NoneType.__format__
The same as above using the MC in front.
If i purposefully enter in a name that I know will not return a value I also get the blank table.
Metadata
Metadata
Assignees
Labels
No labels