Files
offline-db/patch_users_services.py
1679d766c9 Fix badge system tests, validate_image_mimetype, and user bio migrations (#345)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Senpai-YoloBot <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-19 21:07:24 +00:00

11 lines
473 B
Python

with open('users/services.py', 'r') as f:
content = f.read()
content = content.replace(" cache_key = f'user_{user.id}_badges_checked'\n if cache.get(cache_key):\n return\n", "")
content = content.replace("\n cache.set(cache_key, True, 30 * 60)\n", "")
content = content.replace(" cache_key = f'user_{user.id}_chat_badges_checked'\n if cache.get(cache_key):\n return\n", "")
with open('users/services.py', 'w') as f:
f.write(content)