Skip to content

Commit

Permalink
guide: Hide license guide if not required
Browse files Browse the repository at this point in the history
This is not desired for most private instances.
  • Loading branch information
nijel committed May 12, 2021
1 parent f986a5d commit e1331d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions weblate/trans/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

from django.conf import settings
from django.core.cache import cache
from django.template.loader import render_to_string
from django.urls import reverse
Expand Down Expand Up @@ -146,6 +147,9 @@ class LicenseGuideline(Guideline):
url = "settings"
anchor = "basic"

def is_relevant(self):
return settings.LICENSE_REQUIRED

def is_passing(self):
return self.component.libre_license

Expand Down

0 comments on commit e1331d3

Please sign in to comment.