Skip to content

recast doesn't work when passing a class and not a string #65

@souliane

Description

@souliane

Python 3.10.7
Django==4.1.5
django-typed-models 0.12.0

recast() does not work when passing a class and not a string.

Here, base will be self.__class__ because typed model subclasses also have the _typedmodels_registry attribute.

Later, this will evaluates to False if the target typ is not the same as self.__class__.

PS: the test here works because BigCat is a Feline. It should be change so that the target model is not a subclass of self.__class__.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions