univ-of-utah-marriott-library-apple / jctl

`jctl` uses `python-jamf` to select objects to create, delete, print and update. It allows performing Jamf Pro repetitive tasks quickly and provides options not available in the web GUI. It is similar to SQL statements, but far less complex.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subcommand `spreadsheet` fails for policies

Bearzooka opened this issue · comments

I was trying to get a detailed list of the policies that have the checkin trigger by running jctl policies -s general/trigger_checkin==true -S spreadsheet but it failed with the following error:

File "/Users/bprieto/.pyenv/versions/3.9.10/bin/jctl", line 559, in <module>
    main(sys.argv[1:])
  File "/Users/bprieto/.pyenv/versions/3.9.10/bin/jctl", line 405, in main
    method(record, *args.sub_command["args"])
  File "/Users/bprieto/.pyenv/versions/3.9.10/lib/python3.9/site-packages/jamf/records.py", line 1321, in spreadsheet_print_during
    print(self.spreadsheet())
  File "/Users/bprieto/.pyenv/versions/3.9.10/lib/python3.9/site-packages/jamf/records.py", line 1342, in spreadsheet
    if self.data["general"]["trigger_logout"] == "true":
KeyError: 'trigger_logout'

I also tried without the search with the same result.

I get the same error. I'll try to get this fixed by the end of today.

I've released the fix. The bug was in python-jamf, so that's what was updated.

I just tested it and it works like a charm. Thanks.