From 8fa135d52e05a8681c0fdbbccc9fcf17a6c79109 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Tue, 1 Nov 2016 19:05:11 +0100 Subject: [PATCH] Add license types and notes to asset node_type --- pillar/api/node_types/asset.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pillar/api/node_types/asset.py b/pillar/api/node_types/asset.py index be71fc64..4409e98f 100644 --- a/pillar/api/node_types/asset.py +++ b/pillar/api/node_types/asset.py @@ -39,12 +39,29 @@ node_type_asset = { # this schema: "Root > Nested Category > One More Nested Category" 'categories': { 'type': 'string' - } + }, + 'license_type': { + 'default': 'cc-by', + 'type': 'string', + 'allowed': [ + 'cc-by', + 'cc-0', + 'cc-by-sa', + 'cc-by-nd', + 'cc-by-nc', + 'copyright' + ] + }, + 'license_notes': { + 'type': 'string' + }, }, 'form_schema': { 'content_type': {'visible': False}, 'order': {'visible': False}, 'tags': {'visible': False}, - 'categories': {'visible': False} + 'categories': {'visible': False}, + 'license_type': {'visible': False}, + 'license_notes': {'visible': False}, }, }