forked from CGM_Public/pretix_original
Fix errors in license compliance dialog
This commit is contained in:
@@ -36,4 +36,4 @@ def get_source(request):
|
||||
n = d.get('source_notice', '')
|
||||
return render(request, 'source.html', {'notice': n})
|
||||
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()
|
||||
for entry_point in pkg_resources.iter_entry_points(group='pretix.plugin', name=None):
|
||||
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}'
|
||||
seen.add(entry_point.dist.key)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user