fix: 改密账号更新日期没有更新 (#12524)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot 2024-01-11 17:57:23 +08:00 committed by GitHub
parent 6dcc74a388
commit 3eb0b768a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,7 +161,8 @@ class ChangeSecretManager(AccountBasePlaybookManager):
print("Account not found, deleted ?")
return
account.secret = recorder.new_secret
account.save(update_fields=['secret'])
account.date_updated = timezone.now()
account.save(update_fields=['secret', 'date_updated'])
def on_host_error(self, host, error, result):
recorder = self.name_recorder_mapper.get(host)