mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
fix BucketObjectLockSys
This commit is contained in:
@@ -17,13 +17,10 @@ impl BucketObjectLockSys {
|
||||
}
|
||||
|
||||
pub async fn get(bucket: &str) -> Option<DefaultRetention> {
|
||||
if let Some(object_lock_rule) = get_object_lock_config(bucket)
|
||||
.await
|
||||
.expect("get_object_lock_config err!")
|
||||
.0
|
||||
.rule
|
||||
{
|
||||
return object_lock_rule.default_retention;
|
||||
if let Some(object_lock_config) = get_object_lock_config(bucket).await {
|
||||
if let Some(object_lock_rule) = object_lock_config.0.rule {
|
||||
return object_lock_rule.default_retention;
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user