Skip to content

Commit e6e9578

Browse files
authored
Addons: disable the field instead of remove it (#11628)
Templates make usage of this field. If we remove it they break. Disabling it keeps the features and the template working as expected. We can come back later if we want to do something else here, but I'm making it to not break for now.
1 parent 794b58b commit e6e9578

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readthedocs/projects/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ def __init__(self, *args, **kwargs):
696696

697697
# Keep the ability to disable addons completely on Read the Docs for Business
698698
if not settings.RTD_ALLOW_ORGANIZATIONS and addons_enabled_by_default:
699-
self.fields.pop("enabled")
699+
self.fields["enabled"].disabled = True
700700

701701
def clean(self):
702702
if (

0 commit comments

Comments
 (0)