From 44b85796fae2a4a7d95f694c63ad2ee2f1db9d4b Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 20 Mar 2023 14:50:52 +0000 Subject: [PATCH] Clear tokens when aggregator saved --- core/views/aggregators.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/views/aggregators.py b/core/views/aggregators.py index 86cd617..4b72588 100644 --- a/core/views/aggregators.py +++ b/core/views/aggregators.py @@ -271,6 +271,11 @@ class AggregatorUpdate(LoginRequiredMixin, OTPRequiredMixin, ObjectUpdate): submit_url_name = "aggregator_update" + def post_save(self, obj): + obj.access_token = None + obj.access_token_expires = None + obj.save() + class AggregatorDelete(LoginRequiredMixin, OTPRequiredMixin, ObjectDelete): model = Aggregator