#37139: InlineAdmin breaks when using db_default on primary key field without a
python default
-------------------------------------+-------------------------------------
     Reporter:  Mariusz Felisiak     |                    Owner:  Mariusz
                                     |  Felisiak
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.admin        |                  Version:  5.2
     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 Mariusz Felisiak):

 To be clear, inlines are involved, but `uuid` with `db_default` is in the
 main object not in the inlines.

 Replying to [comment:2 Jacob Walls]:
 > Reproduced on 5.2 with a project that had an equivalent custom function.
 I think admin inlines require having a python default on the field.

 🤔 I'm not sure I bu that argument. This way we could copy code of all new
 features to the older version of Django and say it doesn't work there so
 it is not a bug in the function 😉😉, sure it's not a direct bug in
 `UUID7()` but a long standing issue in handling `DatabaseDefault` in
 inlines, however people will try to use new functions and hit the same. I
 need to check carefully why we pass an empty parent instance to the inline
 form etc., admin is not my area of expertise.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37139#comment:4>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019e8da177f3-69a3e5ef-dfb5-48d8-a8ef-c789c51ab7bd-000000%40eu-central-1.amazonses.com.

Reply via email to