When QuotaUsage.updated_at is None, it will raise non-expected exception.
Just verify it.
Fix bug
1197259
Change-Id: I2b41d025f8cffa6c0b3f0153a5194d5e7b1a05df
usages[resource].until_refresh -= 1
if usages[resource].until_refresh <= 0:
refresh = True
- elif max_age and (usages[resource].updated_at -
- timeutils.utcnow()).seconds >= max_age:
+ elif max_age and usages[resource].updated_at is not None and (
+ (usages[resource].updated_at -
+ timeutils.utcnow()).seconds >= max_age):
refresh = True
# OK, refresh the usage