Closed
Description
Deployment Type
Self-hosted
NetBox Version
v3.7.6
Python Version
3.12
Steps to Reproduce
I created a custom_field for device roles content type named "created_by" .
It accepts Users > User as object type.
After I have created a permission with {"custom_field_data__created_by": "$user"} as constraint, I get 'Object of type User is not JSON serializable' when I try to either change or delete a device role created by myself. Putting my user id instead of "$user" works as expected.
Expected Behavior
Constraint with {"custom_field_data__created_by": "$user"} should recognize the User token
Observed Behavior
The user token "$user" is not recognized and I get 'Object of type User is not JSON serializable'