django-lifecycle icon indicating copy to clipboard operation
django-lifecycle copied to clipboard

perf: don't eval attr just pass to isinstance

Open TonisPiip opened this issue 5 months ago • 1 comments

Had a nasty issue where I had a large QS be a @class_property, and this code caused it to eval the QS, there's no need to eval it, just pass it directly do isinstance, if we really want a check, a is not None would be better.

But would be even better if this didn't loop over all properities, rather it used

cls._meta.related_objects

TonisPiip avatar Sep 12 '24 15:09 TonisPiip