Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Commit 68c329a

Browse files
authored
Merge branch 'test' into CSCMETAX-394-remove-sensitive-data-in-oai-pmh
2 parents f27ada1 + 3cd96f4 commit 68c329a

File tree

7 files changed

+361
-15
lines changed

7 files changed

+361
-15
lines changed

.flake8

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ ignore =
2727
# do not use bare except
2828
E722
2929

30-
# often contains "unused" imports
31-
exclude = __init__.py, src/metax_api/migrations, src/static
30+
# often contains "unused" imports, too long lines (generated files), and such
31+
exclude = __init__.py,src/metax_api/migrations/*,src/static

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66
/src/.coverage
77
.idea/
88
ubuntu-xenial-16.04-cloudimg-console.log
9-
/src/metax_api/migrations/*
10-
!/src/metax_api/migrations/*__keep*
119
.ropeproject/

src/metax_api/management/commands/loadinitialdata.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _load_data_catalogs(self):
100100
except:
101101
raise CommandError(response.content)
102102

103-
if self._error_is_already_exists(errors['catalog_json']):
103+
if self._error_is_already_exists(errors.get('catalog_json', {})):
104104
self.stdout.write('Catalog %s already exists, updating instead...' %
105105
dc['catalog_json']['identifier'])
106106

@@ -139,7 +139,7 @@ def _load_file_storages(self):
139139
errors = response.json()
140140
except:
141141
raise CommandError(response.content)
142-
if self._error_is_already_exists(errors['file_storage_json']):
142+
if self._error_is_already_exists(errors.get('file_storage_json', {})):
143143
self.stdout.write('File storage %s already exists, updating instead...' %
144144
fs['file_storage_json']['identifier'])
145145

src/metax_api/migrations/0001_initial.py

+357
Large diffs are not rendered by default.

src/metax_api/migrations/0002_create_json_indexes__keep.py renamed to src/metax_api/migrations/0002_create_json_indexes.py

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
# Generated by Django 1.11.4 on 2017-08-14 12:21
32
from __future__ import unicode_literals
43

54
from django.db import migrations
@@ -9,8 +8,6 @@ class Migration(migrations.Migration):
98

109
"""
1110
Create unique indexes for fields inside the jsonfields in different models.
12-
13-
Note that this file is not deleted during the recreate-db command.
1411
"""
1512

1613
dependencies = [

src/metax_api/migrations/__init__.py

Whitespace-only changes.

src/metax_api/migrations/readme__keep.txt

-6
This file was deleted.

0 commit comments

Comments
 (0)