From 6875272618e0b4e96a2364592eb200d77acb92ca Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Tue, 5 Mar 2019 19:29:16 +0000 Subject: [PATCH] AgePolicy: Update age-requirement in excuses to match hints Signed-off-by: Niels Thykier --- britney2/policies/policy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/britney2/policies/policy.py b/britney2/policies/policy.py index 685bbea..e071d68 100644 --- a/britney2/policies/policy.py +++ b/britney2/policies/policy.py @@ -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: