Prefix should not be required for S3 lifecycle config. Closes #930.

This commit is contained in:
Steve Pulec 2017-05-10 22:44:57 -04:00
parent 956f44d46c
commit 2adc5f2ace

View File

@ -281,7 +281,7 @@ class FakeBucket(BaseModel):
transition = rule.get('Transition')
self.rules.append(LifecycleRule(
id=rule.get('ID'),
prefix=rule['Prefix'],
prefix=rule.get('Prefix'),
status=rule['Status'],
expiration_days=expiration.get('Days') if expiration else None,
expiration_date=expiration.get('Date') if expiration else None,