Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Deserialization error when updating assigned asset #4

Open
rlouch2 opened this issue Apr 26, 2021 · 3 comments
Open

Deserialization error when updating assigned asset #4

rlouch2 opened this issue Apr 26, 2021 · 3 comments

Comments

@rlouch2
Copy link

rlouch2 commented Apr 26, 2021

The SnipeIT JSON is returning an "assigned_to" integer that isn't being mapped

Newtonsoft.Json.JsonSerializationException: 'Error converting value 864 to type 'SnipeSharp.Models.AssetAssignedTo'. Path 'payload.assigned_to', line 1, position 250.'

To replicate change some elements on an asset that is assigned to a user and call the update asset.

@rlouch2
Copy link
Author

rlouch2 commented Apr 27, 2021

This is related to this issue just opened in Snipe - snipe/snipe-it#9427

@busterg5
Copy link

hello all,

is there already a solution to this error or a workaround to update assets that are assigned?

greetings
Chris

@rlouch2
Copy link
Author

rlouch2 commented Mar 22, 2022

The actual issue isn't with this wrapper but in how Snipe is processing data and returning different objects. Right now my workaround is simply to check the asset in make the change and check it back out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants