#23454: TypeError: int() argument must be a string or a number, not 'User'
-----------------------------+--------------------------------------
Reporter: acooley2006 | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by timgraham):
* status: new => closed
* resolution: => invalid
Comment:
The requirement to use the primary key is documented
[https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.default
in the documentation] and the decision discussed in #25129:
For fields like `ForeignKey` that map to model instances, defaults should
be the value of the field they reference (`pk` unless `to_field` is set)
instead of model instances.
--
Ticket URL: <https://code.djangoproject.com/ticket/23454#comment:5>
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.ffc2e8c882c2c804a59b30f7e6d4cc18%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.