8000 [BUG]: Incorrect Model Name Handling · Issue #357 · tortoise/aerich · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[BUG]: Incorrect Model Name Handling #357
Open
@pysashapy

Description

@pysashapy

In aerich.migrate:234, the current code fails to handle application names with multiple periods (e.g., example.account.models), incorrectly splitting the name and using the second segment.

Current Code:

model = cls._get_model(new_model_describe["name"].split(".")[1])

Suggested Fix:

model = cls._get_model(new_model_describe["name"].split(".")[-1])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0