Skip to content

Commit 45990b3

Browse files
committed
make default location as an argument of the method
1 parent 3f15419 commit 45990b3

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

synapseclient/models/mixins/storage_location_mixin.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ class ProjectSettingsMixin(StorageLocationConfigurable):
271271
)
272272
async def set_storage_location_async(
273273
self,
274-
storage_location_id: Optional[Union[int, List[int]]] = None,
274+
storage_location_id: Optional[
275+
Union[int, List[int]]
276+
] = DEFAULT_STORAGE_LOCATION_ID,
275277
*,
276278
synapse_client: Optional[Synapse] = None,
277279
) -> "ProjectSetting":
@@ -283,7 +285,7 @@ async def set_storage_location_async(
283285
Arguments:
284286
storage_location_id: The storage location ID(s) to set. Can be a single
285287
ID, a list of IDs (first is default, max 10), or None to use
286-
Synapse default storage.
288+
Synapse default storage. By default, the default Synapse S3 storage location is used.
287289
synapse_client: If not passed in and caching was not disabled by
288290
`Synapse.allow_client_caching(False)` this will use the last created
289291
instance from the Synapse class constructor.
@@ -318,9 +320,6 @@ async def main():
318320
if not self.id:
319321
raise ValueError("The entity must have an id set.")
320322

321-
if storage_location_id is None:
322-
storage_location_id = DEFAULT_STORAGE_LOCATION_ID
323-
324323
if isinstance(storage_location_id, list):
325324
locations = storage_location_id
326325
else:

0 commit comments

Comments
 (0)