Closed dantownsend closed 1 year ago
@dantownsend You're right. The only change we need to make is to cast the user_id
to user_id=str(request.user.user_id)
and everything will work for both Serial
or UUID
primary key.
@sinisaos Yeah, I think it's worth adding as it's such a small change.
In some situations the user may need to modify
BaseUser
andSessionsBase
to useUUID
s instead.We can do this with a very minor change to Piccolo Admin.
This pretty much works out of the box, except for one minor thing here:
https://github.com/piccolo-orm/piccolo_admin/blob/f2fbcea0ef5dcff029f67a023b1d1965e7a07fec/piccolo_admin/endpoints.py#L776-L780
We just need to cast
user_id
to a string, in case it's aUUID
.