grokability / jamf2snipe

Import and sync assets from a JAMFPro instance to Snipe-IT asset management.
MIT License
113 stars 55 forks source link

Fixed two condition checks for confirming updating fields #56

Closed goneafk closed 3 years ago

goneafk commented 4 years ago

I fixed two condition checks to make sure the data from Jamf and the data from Snipe are aligned.

During a sync, these fields are updating correctly but showing as failed because the data doesn't match at the time of comparison.

Snipe adds 00:00:00 to the purchase_date output, and json output reports None for a blank value while the payload[key] contains an empty string ''.

By doing these two conditional checks, I stop the warnings for a machine updating the purchase date, and for an empty extension attribute.