From 49c96e7469c7a848fa0e3e5c0eb115139853cf42 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 20 2017 08:49:57 +0000 Subject: Only generate the list of items if there is something to split --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 46c7640..52599bd 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -3710,7 +3710,11 @@ def set_custom_key_fields(session, project, fields, types, data): # Only Lists use data, strip it otherwise data[idx] = None else: - data[idx] = [item.strip() for item in data[idx].split(',')] + if data[idx]: + data[idx] = [ + item.strip() + for item in data[idx].split(',') + ] if key in current_keys: issuekey = current_keys[key]