Set (or clear, with None) a user’s avatar spec, returning the refreshed row, or None if absent.
- Parameters:
- conn
psycopg.Connection An open accounts-database connection.
- user_id
int The user to update.
- avatar
dict or None The avatar spec {card_id, image_path, crop} to store as JSON, or None to clear it.