dataquest-dev / dspace-import

Blackbox tests for dspace repository
Other
0 stars 2 forks source link

UFAL/PY-Two clarin licenses are not imported #77

Closed milanmajchrak closed 11 months ago

milanmajchrak commented 1 year ago

Problem description

It is: 'http://www.gnu.org/licenses/gpl-2.0.html' and 'http://opensource.org/licenses/mit-license.php'

Python log shows this error message:

WARNING:root:Unexpected response while creating item: 422; http://localhost:8080/server/api/clarin/import/license?eperson=d0c3b594-6b1f-4622-9824-072d10fdaa12; {"timestamp":"2023-08-09T15:23:56.470+00:00","status":422,"error":"Unprocessable Entity","message":"Unprocessable or invalid entity","path":"/server/api/clarin/import/license"}
ERROR:root:POST request clarin/import/license failed. Exception: <Response [422]>
INFO:root:api post Response 422

WARNING:root:Unexpected response while creating item: 422; http://localhost:8080/server/api/clarin/import/license?eperson=d0c3b594-6b1f-4622-9824-072d10fdaa12; {"timestamp":"2023-08-09T15:23:56.479+00:00","status":422,"error":"Unprocessable Entity","message":"Unprocessable or invalid entity","path":"/server/api/clarin/import/license"}
ERROR:root:POST request clarin/import/license failed. Exception: <Response [422]>

Server logs shows this error message:

2023-08-09 17:23:56,465 INFO  unknown 7b290ee4-5ab8-4520-8b56-c8bde9f140bb org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request [POST /server/api/clarin/import/license] originated from unknown
2023-08-09 17:23:56,469 ERROR unknown 7b290ee4-5ab8-4520-8b56-c8bde9f140bb org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Unprocessable or invalid entity (status:422)
2023-08-09 17:23:56,474 INFO  unknown 1f7a2025-2308-4663-82e2-50be4da40963 org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request [POST /server/api/clarin/import/license] originated from unknown
2023-08-09 17:23:56,478 ERROR unknown 1f7a2025-2308-4663-82e2-50be4da40963 org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Unprocessable or invalid entity (status:422)
milanmajchrak commented 1 year ago

It fails because the Clarin License user registration is null. - This is BE issue.

milanmajchrak commented 1 year ago

Some special case has occurred: the user record is in the eperson table, but not in the user_registration table. I would like to create a record into user_registration table if the user is already registered.