“string” attributes of deleted entities are treated as special cases (which produces bugs)
The cw_attr_cache
method caches attribute for entities. It's used when requesting the attribute of an entity.
When an entity hasbeen created then deleted, the attributs are still fetchable (and we should have None). But there is a special case for string attributes where unaccessible
(the string) was returned instead of None for other types.
This special case is not handled elsewhere in the code (for instance, we can find attrval = getattr(self, "description")
, returning unaccessible
and then a test if attrval: do_something()
. The do_something
` function may fail, expecting to find the attribute…
The strings attributes should not be handled as special cases.