mirror of
https://github.com/pretix/pretix.git
synced 2026-08-18 12:06:26 +00:00
Fix errors in license compliance dialog
This commit is contained in:
@@ -36,4 +36,4 @@ def get_source(request):
|
|||||||
n = d.get('source_notice', '')
|
n = d.get('source_notice', '')
|
||||||
return render(request, 'source.html', {'notice': n})
|
return render(request, 'source.html', {'notice': n})
|
||||||
else:
|
else:
|
||||||
raise Http404(f'Not used under AGPL ({d["base_license"]})')
|
raise Http404(f'Not used under AGPL ({d.get("base_license")})')
|
||||||
|
|||||||
@@ -134,7 +134,10 @@ class LicenseCheckView(StaffMemberRequiredMixin, FormView):
|
|||||||
seen = set()
|
seen = set()
|
||||||
for entry_point in pkg_resources.iter_entry_points(group='pretix.plugin', name=None):
|
for entry_point in pkg_resources.iter_entry_points(group='pretix.plugin', name=None):
|
||||||
if entry_point.dist.key not in seen:
|
if entry_point.dist.key not in seen:
|
||||||
license, url = self._get_license_for_pkg(entry_point.dist.key)
|
try:
|
||||||
|
license, url = self._get_license_for_pkg(entry_point.dist.key)
|
||||||
|
except FileNotFoundError:
|
||||||
|
license, url = '?', '?'
|
||||||
d['source_notice'] += f'\n{entry_point.dist.key} ({license}): {url}'
|
d['source_notice'] += f'\n{entry_point.dist.key} ({license}): {url}'
|
||||||
seen.add(entry_point.dist.key)
|
seen.add(entry_point.dist.key)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user