Problem with UpdateView and inline formset

15 views
Skip to first unread message

flaudizio

unread,
Aug 17, 2016, 9:08:34 AM8/17/16
to Django users
Hi evebody,

I'm using formset with inline and I can create the object in CreateView, but in UpdateView I get this error:

Erro:

ValidationError at /cadastros/pacientes/atualizar/7/
["'' value must be integer."]

django/db/models/fields/__init__.py in to_python:

Variable  | value
self        <django.db.models.fields.AutoField: id>
value       ''

-----------------------

I think the ID (main form) don't are passing through inline.

-----------------------
My codings:
-----------------------

View:


Forms.py:

TelefonePessoaFormSet = inlineformset_factory(Paciente, TelefonePessoa, fields=('tipo', 'numero',), extra=2, can_delete=True)

Thank's for all.

Reply all
Reply to author
Forward
0 new messages