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

TypeError: "NoneType" object is not iterable #367

Closed
iGormilhit opened this issue Jul 1, 2019 · 3 comments · Fixed by #368 or #373
Closed

TypeError: "NoneType" object is not iterable #367

iGormilhit opened this issue Jul 1, 2019 · 3 comments · Fixed by #368 or #373
Assignees
Labels
bug (critical) Blocking issue, should be fixed ASAP f: circulation Concerns the circulation interface or backend

Comments

@iGormilhit
Copy link

iGormilhit commented Jul 1, 2019

Sentry entry: https://sentrydev.test.rero.ch:8443/share/issue/0c089092b63c4994b3bfd1b5d79b41d4/

This affects all documents detailed views without publishers data with items that have circulation transactions of the deployed v0.2.0 release (ils.test.rero.ch).

@iGormilhit iGormilhit added bug f: circulation Concerns the circulation interface or backend bug (critical) Blocking issue, should be fixed ASAP labels Jul 1, 2019
@iGormilhit
Copy link
Author

I think that the problem is in marc21_to_publishers_publicationDate which always return something in the publishers field, even if there not data.

@iGormilhit iGormilhit self-assigned this Jul 1, 2019
iGormilhit pushed a commit that referenced this issue Jul 1, 2019
* FIX Fixes #367.
* FIX Updates documents fixtures files.
* FIX Updates the dojson test.

Co-Authored-by: Igor Milhit <[email protected]>
Co-Authored-by: Aly Badr <[email protected]>
@iGormilhit
Copy link
Author

This is still not fixed, because in the data there documents like this:

"publishers": [
      {
        "name": [
          "EMP Musique"
        ],
        "place": [
          "[Lieu de publication non identifié]"
        ]
      },
      {}
    ]

@iGormilhit iGormilhit reopened this Jul 2, 2019
@iGormilhit
Copy link
Author

JSON validation failed because an empty publishers array.
https://sentrydev.test.rero.ch:8443/share/issue/582d022e31e740aaa4a296a0ea237da6/

@iGormilhit iGormilhit reopened this Jul 3, 2019
iGormilhit pushed a commit that referenced this issue Jul 3, 2019
* FIX Fixes #367.
* FIX Makes sure dojson conversion does not return an empty array for
publishers.
* FIX Asserts in the tests that an empty publishers key does not exist.
Co-Authored-by: Igor Milhit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (critical) Blocking issue, should be fixed ASAP f: circulation Concerns the circulation interface or backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant