Exception on delete user
Hello,
I get this error when trying to delete a user
System.ArgumentException: Can not add property value to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.
What am I doing:
- created a new user
- created a new group
- added the user to the group
- removed the user
then I get the exception
Interesting part is I don't get this error on my local machine just with my production db
debugged it a little bit looks like the error happens in
SCIMRepresentationExtensions. EnrichResponsewhen callingcase SCIMSchemaAttributeTypes.STRING:thefirstRecord.AttributeNode.SchemaAttribute.Nameis equal to value and the value already exists. seems like the first value that was entered was an email and the second one is the group id I would think they need to go under the groups and emails arrays but they don't
any help would be appriciated
KR
Yoav
Hello,
Indeed there is a bug in the implementation & I could reproduce it on my local machine.
The issue will be fixed tomorrow (01/11) on the branch release/4.0.5.
KR,
SID
Thank you.
KR,
Yoav
The issue has been resolved in the release/4.0.5 branch.
An issue was identified in the DeleteRepresentationCommandHandler class. When the DbContext was saved, the ParentAttributeId property of all representation attributes was set to NULL. As a result, it became impossible to construct the hierarchical result because this property is used during the construction process.
Now, a clone of the representation is returned, and this new object is not affected by the change tracker of Entity Framework :)