#30293: ValueError: invalid literal for int() with base 10: 'None'
---------------------------------+--------------------------------------
Reporter: basictheprogram | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 2.1
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by Simon Charette):
* status: new => closed
* resolution: => invalid
Comment:
Unless
[https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.ForeignKey.to_field
ForeignKey.to_field] is specified your `ArchBase.face_png` field will
point to the `FacePng.id`
[https://docs.djangoproject.com/en/2.1/topics/db/models/#quick-example
which is the implicit primary key] when none is explicitly specified. This
field is an auto-incrementing integer hence why `int('None')` is
attempted.
You either want to explicitly declare one your `FacePng` fields primary
key or make one them unique and adjust `ArchBase.face_png(to_field)` to
point to it. Please see one of the
[https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
support channels] if you need further assistance.
--
Ticket URL: <https://code.djangoproject.com/ticket/30293#comment:1>
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/073.a787b36981a74d28e60eaeb89e63f3be%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.