forked from rDrama/rDrama
1
0
Fork 0

fix 500 error

master
Aevann 2024-02-06 03:20:46 +02:00
parent 7747b7844a
commit e990757bda
1 changed files with 11 additions and 10 deletions

View File

@ -72,6 +72,7 @@ def after_request(response):
if FEATURES['IP_LOGGING']:
if g.v.admin_level < PERMS['EXEMPT_FROM_IP_LOGGING'] and user_id != CARP_ID:
ip = get_IP()
if ip:
existing = g.db.query(IPLog).filter_by(user_id=user_id, ip=ip).one_or_none()
if existing:
existing.last_used = time.time()