From 7c6fe971f4ae34f08b3d2c23e79c61d5d151cedb Mon Sep 17 00:00:00 2001
From: marko <marko.kuder@xlab.si>
Date: Fri, 28 Feb 2020 10:24:55 +0100
Subject: [PATCH] fix licence detection errors when harvested package does not
 have any

---
 ckanext/dgu/lib/helpers.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ckanext/dgu/lib/helpers.py b/ckanext/dgu/lib/helpers.py
index d02fdbd5c..e6972c612 100644
--- a/ckanext/dgu/lib/helpers.py
+++ b/ckanext/dgu/lib/helpers.py
@@ -2914,6 +2914,8 @@ def detect_license_id(licence_str):
     :returns (license_id, is_wholely_identified)
     '''
     license_id = ''
+    if not licence_str:
+        return license_id, None
 
     global licence_regexes
     if licence_regexes is None:
-- 
GitLab