Opened 6 years ago

Closed 6 years ago

#11490 closed (worksforme)

Editing a model that contains m2m inline hangs the server

Reported by: v.kryachko@… Owned by: nobody
Component: contrib.admin Version: 1.0
Severity: Keywords: inlines
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The code first:

#models.py
class Obj(models.Model):
    name = models.CharField(max_length=100)

class ObjConf(models.Model):
    obj = models.ForeignKey(Obj, unique=True)

    someStuff = models.ManyToManyField('someStuff')

class someStuff(models.Model):
    name = models.CharField(max_length=100)

#admin.py
class ObjConfInline(admin.TabularInline):
    model = ObjConf

class ObjAdmin(admin.ModelAdmin):
    inlines = [ObjConfInline,]

admin.site.register(Obj, ObjAdmin)

When I create a new instance of Obj, everything is OK. But when trying to /admin/project/app_name/Obj/1 the server starts thinking forever and never responds(only Ctrl+C works)

Change History (1)

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top