Skip to content

Commit

Permalink
Create bucket should support user_project.
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaFaer committed Nov 4, 2019
1 parent db2c0ae commit 8000ce6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storage/google/cloud/storage/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,6 @@ def create_bucket(
>>> bucket = client.create_bucket(bucket) # API request.
"""
if user_project is not None:
raise ValueError("Cannot create bucket with 'user_project' set.")

bucket = self._bucket_arg_to_bucket(bucket_or_name)

if project is None:
Expand All @@ -422,6 +419,9 @@ def create_bucket(
)
query_params["predefinedDefaultObjectAcl"] = predefined_default_object_acl

if user_project is not None:
query_params["userProject"] = user_project

properties = {key: bucket._properties[key] for key in bucket._changes}
properties["name"] = bucket.name

Expand Down

0 comments on commit 8000ce6

Please sign in to comment.