Clear tokens when aggregator saved

This commit is contained in:
Mark Veidemanis 2023-03-20 14:50:52 +00:00
parent 1dd254a3a7
commit 44b85796fa
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 5 additions and 0 deletions

View File

@ -271,6 +271,11 @@ class AggregatorUpdate(LoginRequiredMixin, OTPRequiredMixin, ObjectUpdate):
submit_url_name = "aggregator_update" 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): class AggregatorDelete(LoginRequiredMixin, OTPRequiredMixin, ObjectDelete):
model = Aggregator model = Aggregator