Browse Source

AgePolicy: Update age-requirement in excuses to match hints

Signed-off-by: Niels Thykier <niels@thykier.net>
devuan-deployment
Niels Thykier 1 year ago
parent
commit
6875272618
No known key found for this signature in database GPG Key ID: A65B78DBE67C7AAC
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      britney2/policies/policy.py

+ 4
- 1
britney2/policies/policy.py View File

@@ -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