mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #21414 -- Removed RelatedObject and deprecated Field.related.
This commit is contained in:
committed by
Tim Graham
parent
6e08bde8c4
commit
f233bf47dd
@@ -883,8 +883,7 @@ class BaseInlineFormSet(BaseModelFormSet):
|
||||
|
||||
@classmethod
|
||||
def get_default_prefix(cls):
|
||||
from django.db.models.fields.related import RelatedObject
|
||||
return RelatedObject(cls.fk.rel.to, cls.model, cls.fk).get_accessor_name().replace('+', '')
|
||||
return cls.fk.rel.get_accessor_name(model=cls.model).replace('+', '')
|
||||
|
||||
def save_new(self, form, commit=True):
|
||||
# Use commit=False so we can assign the parent key afterwards, then
|
||||
|
||||
Reference in New Issue
Block a user