Skip to content

Commit

Permalink
fix: avoid updating the anon last_active
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed May 8, 2024
1 parent 24f1d66 commit 3071402
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion horde/classes/base/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@ def update_user_record(self, record_type, record, increment_value):
db.session.commit()

def record_usage(self, raw_things, kudos, usage_type):
self.last_active = datetime.utcnow()
if not self.is_anon():
self.last_active = datetime.utcnow()
self.modify_kudos(-kudos, "accumulated")
self.update_user_record(record_type=UserRecordTypes.REQUEST, record=usage_type, increment_value=1)
self.update_user_record(
Expand Down

0 comments on commit 3071402

Please sign in to comment.