You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The get_readonly_fields of a nested inline does not have the proper obj passed:
Consider the following configuration:
class SecondLevelInline(NestedStackedInline):
model = SecondLevelModel
def get_readonly_fields(self, request, obj=None):
# obj is a "FirstLevelModel" instead of a "SecondLevelModel"
class FirstLevelInline(NestedStackedInline):
model = FirstLevelModel
inlines = [SecondLevelInline, ]
So i cannot make a conditional readonly_fields for my SecondLevelModel and I should have access to an instance of a SecondLevelModel.
The text was updated successfully, but these errors were encountered:
The get_readonly_fields of a nested inline does not have the proper obj passed:
Consider the following configuration:
So i cannot make a conditional readonly_fields for my SecondLevelModel and I should have access to an instance of a SecondLevelModel.
The text was updated successfully, but these errors were encountered: