From f249b1e158cf8a8c39520384086dfaaba815dca3 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 4 Jul 2023 23:44:28 +0300 Subject: [PATCH] fix i think --- files/helpers/cron.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/helpers/cron.py b/files/helpers/cron.py index 37e1925b4..5dda09608 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -173,10 +173,9 @@ def _process_timer(attr, badge_ids, text, extra_attrs={}): uids = set([x.id for x in users]) #set user attributes - attr_dict = {attr: 0} | extra_attrs - for user in users: - for k, val in attr_dict.items(): + setattr(user, attr, 0) + for k, val in extra_attrs.items(): k = str(k).split('.')[1] if isinstance(val, InstrumentedAttribute): val = str(val).split('.')[1]