From f75dc24411515700ec7c060c841311134e4c9288 Mon Sep 17 00:00:00 2001 From: Hannu Kamarainen Date: Tue, 5 Jun 2018 14:57:17 +0300 Subject: [PATCH] CSCMETAX-406: [ADD] Update data catalog and production catalog schemas also --- src/metax_api/initialdata/datacatalogs.json | 20 ++++++++----------- .../management/commands/loadinitialdata.py | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/metax_api/initialdata/datacatalogs.json b/src/metax_api/initialdata/datacatalogs.json index 8f3cea23..6d44a16c 100644 --- a/src/metax_api/initialdata/datacatalogs.json +++ b/src/metax_api/initialdata/datacatalogs.json @@ -54,12 +54,10 @@ } } ], - "description": [ - { - "en": "Datasets stored in the IDA service", - "fi": "IDA-palvelussa säilytettävät aineistot" - } - ] + "description": { + "en": "Datasets stored in the IDA service", + "fi": "IDA-palvelussa säilytettävät aineistot" + } }, "dataset_versioning": true, "research_dataset_schema": "ida" @@ -121,12 +119,10 @@ } } ], - "description": [ - { - "en": "Contains datasets that are not stored in the Finnish Fairdata services.", - "fi": "Sisältää esimerkiksi verkkoaineistot, rajapinnat ja muut muualla kuin fairdata-palveluissa säilytettävät aineistot." - } - ] + "description": { + "en": "Contains datasets that are not stored in the Finnish Fairdata services.", + "fi": "Sisältää esimerkiksi verkkoaineistot, rajapinnat ja muut muualla kuin fairdata-palveluissa säilytettävät aineistot." + } }, "dataset_versioning": false, "research_dataset_schema": "att" diff --git a/src/metax_api/management/commands/loadinitialdata.py b/src/metax_api/management/commands/loadinitialdata.py index b17cad7f..9b3857a8 100644 --- a/src/metax_api/management/commands/loadinitialdata.py +++ b/src/metax_api/management/commands/loadinitialdata.py @@ -113,7 +113,7 @@ def _load_data_catalogs(self): continue # create or update ended in error - self.stdout.write('Failed to process catalog: %s. Reason: %s' % + raise CommandError('Failed to process catalog: %s. Reason: %s' % (dc['catalog_json']['identifier'], errors)) def _load_file_storages(self): @@ -152,5 +152,5 @@ def _load_file_storages(self): continue # create or update ended in error - self.stdout.write('Failed to process storage: %s. Reason: %s' % + raise CommandError('Failed to process storage: %s. Reason: %s' % (fs['file_storage_json']['identifier'], errors))