Skip to content

Commit

Permalink
Move additional version text for response page into explicit variable
Browse files Browse the repository at this point in the history
Per review.
  • Loading branch information
mpacer committed Dec 6, 2019
1 parent 609fef6 commit d4a537f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bookstore/clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ def construct_template_params(self, s3_bucket, s3_object_key, s3_version_id=None
redirect_contents_url = url_path_join(self.base_url, self.default_url)
clone_api_url = url_path_join(self.base_url, "/api/bookstore/clone")
model = {"s3_bucket": s3_bucket, "s3_key": s3_object_key, "s3_version_id": s3_version_id}
version_text = ' version: ' + s3_version_id if s3_version_id else ''
template_params = {
"post_model": model,
"clone_api_url": clone_api_url,
"redirect_contents_url": redirect_contents_url,
"source_description": f"'{s3_object_key}'{' version: '+s3_version_id if s3_version_id else ''} from the s3 bucket '{s3_bucket}'",
"source_description": f"'{s3_object_key}'{version_text} from the s3 bucket '{s3_bucket}'",
}
return template_params

Expand Down

0 comments on commit d4a537f

Please sign in to comment.