Closed aaxelb closed 7 years ago
IDObfuscator.encode used type() to get the model of an instance, which broke on the SimpleLazyObject wrapper Django uses for users. Instead, use instance._meta, which is proxied to the wrapped object, and should work equivalently for all models.
IDObfuscator.encode
type()
SimpleLazyObject
instance._meta
IDObfuscator.encode
usedtype()
to get the model of an instance, which broke on theSimpleLazyObject
wrapper Django uses for users. Instead, useinstance._meta
, which is proxied to the wrapped object, and should work equivalently for all models.