diff --git a/alembic/versions/38581a8fbae2_add_custom_field_data.py b/alembic/versions/38581a8fbae2_add_custom_field_data.py index 238b487..925009c 100644 --- a/alembic/versions/38581a8fbae2_add_custom_field_data.py +++ b/alembic/versions/38581a8fbae2_add_custom_field_data.py @@ -15,8 +15,11 @@ import sqlalchemy as sa def upgrade(): + ''' Add a new drop-down list type to the custom fields. This requires us + to store the list items in the issue_keys table. ''' op.add_column('issue_keys', sa.Column('key_data', sa.Text())) def downgrade(): + ''' Remove the key_data column ''' op.drop_column('issue_keys', 'key_data') diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 358142d..4f90167 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -3472,7 +3472,7 @@ def set_custom_key_fields(session, project, fields, types, data): for idx, key in enumerate(fields): if types[idx] != "list": # Only Lists use data, strip it otherwise - data[idx] = "" + data[idx] = None if key in current_keys: issuekey = current_keys[key] issuekey.key_type = types[idx] diff --git a/pagure/templates/settings.html b/pagure/templates/settings.html index 90933c2..7551b7e 100644 --- a/pagure/templates/settings.html +++ b/pagure/templates/settings.html @@ -733,7 +733,7 @@