Данные формы ManagementForm отсутствуют или были подделаны. Отсутствующие поля: servicesprice_set-TOTAL_FORMS

Когда я изменяю и сохраняю с Inclusive на Exclusive Django admin выдает мне следующую ошибку:

(Hidden field TOTAL_FORMS) This field is required.
(Hidden field INITIAL_FORMS) This field is required.

ManagementForm data is missing or has been tampered with. Missing fields: servicesprice_set-TOTAL_FORMS, 
    servicesprice_set-INITIAL_FORMS. You may need to file a bug report if the issue persists.

enter image description here

Это происходит после переопределения встроенного поля. Что это значит?

@admin.register(Services)
class ServicesAdmin(ImportExportModelAdmin, EmptyFieldListFilter):
    ...
    inlines = [
        SubServiceInline,
        ServicePriceInline
    ]

    ExclusiveInlines = [
        ExclusiveServicePriceInline
    ]
    InclusiveInlines = []

    ...
    def get_inlines(self, request, obj):
        if not obj.parent_id:
            return self.inlines
        elif obj.type == 1:
            return self.InclusiveInlines
        else:
            return self.ExclusiveInlines
Вернуться на верх