Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

695
Views
ManagementForm data is missing or has been tampered with. Missing fields: servicesprice_set-TOTAL_FORMS

When i am changing and saving from Inclusive To Exclusive Django admin give me following error:

(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

This is happening after i override inline field. What does this mean?

@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
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I'm rather new here myself, but I've been struggling with the same issue today.

It turns out that MyModelAdmin.get_inline() is called before the MyModel.save() when you're saving via the admin panel like that.

This creates a conflict when you're adding an InlineAdmin for a related model that, in my case, wasn't created until the MyModel.save() function was called.

I hope that helps, and I wish I could explain it better. Just learning all of this, myself. :)

Good luck to you!

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!