We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca39628 commit a548b92Copy full SHA for a548b92
readthedocs/core/mixins.py
@@ -44,10 +44,7 @@ class HideProtectedLevelMixin:
44
def __init__(self, *args, **kwargs):
45
super().__init__(*args, **kwargs)
46
47
- if any([
48
- not self.instance,
49
- self.instance and self.instance.privacy_level != PROTECTED,
50
- ]):
+ if self.instance is None or self.instance.privacy_level != PROTECTED:
51
privacy_level = list(PRIVACY_CHOICES)
52
privacy_level.remove((PROTECTED, _('Protected')))
53
self.fields['privacy_level'].choices = privacy_level
0 commit comments