Skip to content

Commit

Permalink
cli: fix several things
Browse files Browse the repository at this point in the history
* Replaces `.format`with f''.
* Corrects verbose message for updated records.
* Changes warning message in dojson for media type.
* Adds communication channel validation to `users_validate` CLI.
* Adds libraries check to `users_validate` CLI.
* Adds `db.session.rollback()` in exception in `import_users` CLI.
* Corrects false creation of user creation error file.
* Corrects pid dependencies configuration files.
* Adds birth day checking to users validation CLI.

Co-Authored-by: Peter Weber <[email protected]>
  • Loading branch information
rerowep and rerowep committed May 18, 2021
1 parent 0c55f94 commit 3a71c92
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 226 deletions.
67 changes: 21 additions & 46 deletions data/pid_dependencies_big.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,35 +112,43 @@
"dependencies": [
{
"name": "supplement",
"ref": "document"
"ref": "document",
"optional": "True"
},
{
"name": "supplementTo",
"ref": "document"
"ref": "document",
"optional": "True"
},
{
"name": "otherEdition",
"ref": "document"
"ref": "document",
"optional": "True"
},
{
"name": "otherPhysicalFormat",
"ref": "document"
"ref": "document",
"optional": "True"
},
{
"name": "issuedWith",
"ref": "document"
"ref": "document",
"optional": "True"
},
{
"name": "precededBy",
"ref": "document"
"ref": "document",
"optional": "True"
},
{
"name": "succeededBy",
"ref": "document"
"ref": "document",
"optional": "True"
},
{
"name": "relatedTo",
"ref": "document"
"ref": "document",
"optional": "True"
}
]
},
Expand Down Expand Up @@ -173,6 +181,11 @@
{
"name": "item_type"
},
{
"name": "temporary_item_type",
"ref": "item_type",
"optional": "True"
},
{
"name": "holding",
"optional": "True"
Expand Down Expand Up @@ -285,43 +298,5 @@
}
}
]
},
{
"name": "operation_logs_creations",
"filename": "operation_logs_creations.json",
"dependencies": [
{
"name": "organisation",
"optional": "True"
},
{
"name": "record",
"refs": {
"organisation": "organisations",
"item": "items",
"holding": "holdings",
"document": "documents"
}
}
]
},
{
"name": "operation_logs_updates",
"filename": "operation_logs_updates.json",
"dependencies": [
{
"name": "organisation",
"optional": "True"
},
{
"name": "record",
"refs": {
"organisation": "organisations",
"item": "items",
"holding": "holdings",
"document": "documents"
}
}
]
}
]
48 changes: 45 additions & 3 deletions data/pid_dependencies_small.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,49 @@
},
{
"name": "document",
"filename": "documents_small.json"
"filename": "documents_small.json",
"dependencies": [
{
"name": "supplement",
"ref": "document",
"optional": "True"
},
{
"name": "supplementTo",
"ref": "document",
"optional": "True"
},
{
"name": "otherEdition",
"ref": "document",
"optional": "True"
},
{
"name": "otherPhysicalFormat",
"ref": "document",
"optional": "True"
},
{
"name": "issuedWith",
"ref": "document",
"optional": "True"
},
{
"name": "precededBy",
"ref": "document",
"optional": "True"
},
{
"name": "succeededBy",
"ref": "document",
"optional": "True"
},
{
"name": "relatedTo",
"ref": "document",
"optional": "True"
}
]
},
{
"name": "holding",
Expand All @@ -119,7 +161,7 @@
},
{
"name": "circulation_category",
"ref": "item_type"
"ref": "item_types"
},
{
"name": "document"
Expand Down Expand Up @@ -252,4 +294,4 @@
}
]
}
]
]
2 changes: 1 addition & 1 deletion rero_ils/dojson/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ def init_content_media_carrier_type(self):
elif media_type_from_338 != media_type:
value['mediaType'] = media_type_from_338
error_print(
'MEDIA TYPE ERROR:',
'WARNING MEDIA TYPE:',
self.bib_id, self.rero_id, media_type)

if media_type_from_338 and not media_type:
Expand Down
Loading

0 comments on commit 3a71c92

Please sign in to comment.