#24547: Errors for paths for Model relationships in other apps can be
misleading /
confusing
-------------------------------------+-------------------------------------
Reporter: akulakov | Owner: akulakov
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: error message, | Triage Stage: Accepted
warning |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by akulakov):
I no longer get the error in description, instead I get this traceback:
{{{
File "/Users/akulakov/projects/testproj/app1/models.py", line 4, in
<module>
class M1(models.Model):
File "/Users/akulakov/projects/django/django/db/models/base.py", line
158, in __new__
new_class.add_to_class(obj_name, obj)
File "/Users/akulakov/projects/django/django/db/models/base.py", line
294, in add_to_class
value.contribute_to_class(cls, name)
File
"/Users/akulakov/projects/django/django/db/models/fields/related.py", line
1819, in contribute_to_class
super(ForeignObject, self).contribute_to_class(cls, name,
virtual_only=virtual_only)
File
"/Users/akulakov/projects/django/django/db/models/fields/related.py", line
299, in contribute_to_class
lazy_related_operation(resolve_related_class, cls,
self.remote_field.model, field=self)
File
"/Users/akulakov/projects/django/django/db/models/fields/related.py", line
80, in lazy_related_operation
return apps.lazy_model_operation(partial(function, **kwargs),
*model_keys)
File
"/Users/akulakov/projects/django/django/db/models/fields/related.py", line
78, in <genexpr>
model_keys = (make_model_tuple(m) for m in models)
File "/Users/akulakov/projects/django/django/db/models/utils.py", line
13, in make_model_tuple
app_label, model_name = model.split(".")
ValueError: too many values to unpack (expected 2)
}}}
So it looks like this was changed and the original error can no longer be
triggered?
Unless there's some circumstances that can trigger the original error (I
couldn't find any -- tried both creating initial migration, creating a new
table, adding to existing table), this ticket should be closed.
--
Ticket URL: <https://code.djangoproject.com/ticket/24547#comment:3>
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/066.5cf0e846ff9904bcbd65246927d9b568%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.