You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function is expecting the location param to have a value:
@staticmethod
def storage_prefix_path(location, filename):
"""Join the location path with the filename to get the full object path"""
if filename.startswith('.'):
filename = filename[1:]
return '/'.join([location.value, filename])
But this usage in storage_delete_file could potentially pass a None value, as the parameter is optional and has None as the default value.
@classmethod
@storage_args()
def storage_delete_file(cls, filename, storage_location=None, storage_profile=None):
"""Remove file data from storage."""
storage_instance = cls.storage_get_profile(storage_profile)
storage_instance.delete(path=cls.storage_prefix_path(storage_location, filename)) <------- here, storage_location could be None
return True
The text was updated successfully, but these errors were encountered:
This function is expecting the
location
param to have a value:But this usage in
storage_delete_file
could potentially pass aNone
value, as the parameter is optional and hasNone
as the default value.The text was updated successfully, but these errors were encountered: