Ticket #13618: django.patch

File django.patch, 614 bytes (added by tonnzor, 5 years ago)

Patch that fixed the crash

  • django/contrib/admin/helpers.py

    diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py
    a b  
    2929        self.prepopulated_fields = [{
    3030            'field': form[field_name],
    3131            'dependencies': [form[f] for f in dependencies]
    32         } for field_name, dependencies in prepopulated_fields.items()]
     32        } for field_name, dependencies in prepopulated_fields.items()
     33        if field_name not in readonly_fields]
    3334        self.model_admin = model_admin
    3435        if readonly_fields is None:
    3536            readonly_fields = ()
Back to Top