#23483: Having two dotted app names with the same last part breaks migrations
-----------------------------+---------------------------------------
Reporter: szilveszter | Owner: szilveszter
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------
Comment (by carljm):
I apologize, you're right. It wasn't clear to me from the ticket
description that you did have unique app labels on your apps, and I should
have looked at the PR more closely.
On further inspection, I really wonder if, in addition to your fix,
`AppConfigStub` ought to pass `None` rather than `label` as the first
(`app_name`) argument to `AppConfig.__init__`. Passing the label as the
name is clearly wrong -- label and name are two different things. The only
place `AppConfig.name` is used is in auto-generating a label if needed
(which won't be needed after your fix), and in `import_models()` method,
which `AppConfigStub` overrides anyway. Having a `name` of `None` seems
better than having an incorrect name, in that it would fail fast rather
than be wrong in case something in future tries to use
`AppConfigStub.name`.
Checking now to see if that change has negative effects.
--
Ticket URL: <https://code.djangoproject.com/ticket/23483#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.8e1d8d9ea3f2d75de2eff822ed904ea1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.