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

List of DocumentLink with at least one broken link returns None #61

Open
rguilbault opened this issue Jun 25, 2018 · 1 comment · May be fixed by #62
Open

List of DocumentLink with at least one broken link returns None #61

rguilbault opened this issue Jun 25, 2018 · 1 comment · May be fixed by #62

Comments

@rguilbault
Copy link

rguilbault commented Jun 25, 2018

Hi,

In a document, I have the following structure :

  • a fragment XXX of type Group
    • for each document inside the group, a unique fragment, called YYY, with a DocumentLink.

If in this group, I have at least one DocumentLink which is broken, the fragment XXX returns None, and not Some(Group(List(...))). Is this the expected behaviour ?

Tested on scala 2.11, prismic-kit 2.4.2

Thank you !

Ronan

@rguilbault rguilbault changed the title List of DocumentLink with at least one broken link return None instead of Some(List(...)) List of DocumentLink with at least one broken link return None Jun 25, 2018
@rguilbault rguilbault changed the title List of DocumentLink with at least one broken link return None List of DocumentLink with at least one broken link returns None Jun 25, 2018
@rguilbault
Copy link
Author

rguilbault commented Jun 26, 2018

Ok, I think I founded the bug :

  • When a DocumentLink is broken, the lang attribute is a null
  • However, in PrismicJsonProtocol.scala, it try to convert JsNull spray library to a String... which is apparently not possible.

rguilbault added a commit to rguilbault/scala-kit that referenced this issue Jun 27, 2018
@rguilbault rguilbault linked a pull request Jun 27, 2018 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant