AgePolicy: Update age-requirement in excuses to match hints

Signed-off-by: Niels Thykier <niels@thykier.net>
ubuntu/rebased
Niels Thykier 6 years ago
parent 39e3ad9d55
commit 6875272618
No known key found for this signature in database
GPG Key ID: A65B78DBE67C7AAC

@ -359,7 +359,7 @@ class AgePolicy(BasePolicy):
if min_days < bounty_min_age:
min_days = bounty_min_age
excuse.addhtml('Required age is not allowed to drop below %d days' % min_days)
age_info['age-requirement'] = min_days
age_info['current-age'] = days_old
for age_days_hint in self.hints.search('age-days', package=source_name,
@ -369,8 +369,11 @@ class AgePolicy(BasePolicy):
'new-requirement': new_req,
'changed-by': age_days_hint.user
}
if 'original-age-requirement' not in age_info:
age_info['original-age-requirement'] = min_days
min_days = new_req
age_info['age-requirement'] = min_days
res = PolicyVerdict.PASS
if days_old < min_days:

Loading…
Cancel
Save