Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One record submissions will throw errors #1

Open
kmcelwee opened this issue Sep 18, 2020 · 1 comment
Open

One record submissions will throw errors #1

kmcelwee opened this issue Sep 18, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@kmcelwee
Copy link
Contributor

kmcelwee commented Sep 18, 2020

Response structure differs if there's only one submission:

-        return {'record': {'osti_id': '1488485',
-          'accession_num': '88435/dsp01z316q451j',
-          'product_nos': 'None',
-          'title': 'Toward fusion plasma scenario planning for NSTX-U using machine-learning-accelerated models',
-          'contract_nos': 'AC02-09CH11466',
-          'other_identifying_nos': None,
-          'doi': '10.11578/1488485',
-          'doi_status': 'PENDING',
-          'status': 'SUCCESS',
-          'status_message': None,
-          '@status': 'UPDATED'}}
+        return {
+            "record": [
+                {
+                    "osti_id": "1488485",
+                    "accession_num": "88435/dsp01z316q451j",
+                    "product_nos": "None",
+                    "title": "Fake title 1: Toward fusion plasma scenario planning",
+                    "contract_nos": "AC02-09CH11466",
+                    "other_identifying_nos": None,
+                    "doi": "10.11578/1488485",
+                    "doi_status": "PENDING",
+                    "status": "SUCCESS",
+                    "status_message": None,
+                    "@status": "UPDATED"
+                },
+                {
+                    "osti_id": "1491154",
+                    "accession_num": "88435/dsp012v23vx30c",
+                    "product_nos": "None",
+                    "title": "MHD-blob correlations in NSTX",
+                    "contract_nos": "AC02 09CH11466; FG02-97ER54392; AC52-07NA27344",
+                    "other_identifying_nos": None,
+                    "doi": "10.11578/1491154",
+                    "doi_status": "PENDING",
+                    "status": "SUCCESS",
+                    "status_message": None,
+                    "@status": "UPDATED"
+                }
+            ]
+        }
@kmcelwee kmcelwee changed the title Handle one record submission One record submissions will throw errors Jul 2, 2021
@kmcelwee
Copy link
Contributor Author

kmcelwee commented Jul 2, 2021

The DOE team took note of this issue (see above). Thankfully this situation is rare.

@astrochun astrochun added the bug Something isn't working label Aug 18, 2021
@astrochun astrochun transferred this issue from pulibrary/dspace-osti Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants