Skip to content

Commit

Permalink
Use id attribute instead of pk for build
Browse files Browse the repository at this point in the history
`pk` exists only for Builds that are retrieved from the database, but
when it's retrieved using the API, the `id` must be used.

Using the `id` is compatible with both instances.

Related to #2963
  • Loading branch information
humitos committed Nov 27, 2017
1 parent f93e509 commit 2c99aad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readthedocs/doc_builder/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def update_build(self, state=None):
self.build['error'] = ugettext_noop(
"There was a problem with Read the Docs while building your documentation. "
"Please report this to us with your build id ({build_id}).".format(
build_id=self.build['pk']
build_id=self.build['id']
)
)
log.error(
Expand Down

0 comments on commit 2c99aad

Please sign in to comment.