Skip to content

Commit

Permalink
project: Fixed setting project to public
Browse files Browse the repository at this point in the history
Too much of optimization recently.
  • Loading branch information
nijel committed Apr 26, 2023
1 parent 6c5561a commit 428f711
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion weblate/trans/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,13 @@ def clean(self):
data = self.cleaned_data
if settings.OFFER_HOSTING:
data["contribute_shared_tm"] = data["use_shared_tm"]
if "access_control" not in data or not data["access_control"]:

# ACCESS_PUBLIC = 0, so the condition can not be simplified to not data["access_control"]
if (
"access_control" not in data
or data["access_control"] is None
or data["access_control"] == "" # noqa: PLC1901
):
data["access_control"] = self.instance.access_control
access = data["access_control"]

Expand Down

0 comments on commit 428f711

Please sign in to comment.