Skip to content

Commit

Permalink
Fix preview_session
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan committed Nov 13, 2014
1 parent 2d89bfe commit 0227cf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prismic/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def preview_session(self, token, link_resolver, default_url):
main_document_id = _get_json(token).get("mainDocument")
if main_document_id is None:
return default_url
response = self.form("everything").ref(token).query(predicates.at("document.id")).submit()
response = self.form("everything").ref(token).query(predicates.at("document.id", main_document_id)).submit()
if len(response.results) == 0:
return default_url
return link_resolver(response.results[0].as_link())
Expand Down

0 comments on commit 0227cf8

Please sign in to comment.