perf: Translate

This commit is contained in:
feng
2025-06-18 16:35:02 +08:00
committed by ZhaoJiSen
parent 65f2b92eb3
commit df9e6cf866
42 changed files with 4279 additions and 3111 deletions

View File

@@ -165,7 +165,12 @@ class SessionSerializer(BulkOrgResourceModelSerializer):
def update(self, instance, validated_data):
is_finished = validated_data.get('is_finished')
if settings.CHANGE_SECRET_AFTER_SESSION_END and is_finished and not instance.is_finished:
if (
instance.protocol != 'vnc' and # VNC sessions do not require secret change
settings.XPACK_LICENSE_IS_VALID and
settings.CHANGE_SECRET_AFTER_SESSION_END and
is_finished and not instance.is_finished and instance.is_success
):
self.enqueue_change_secret_task(instance)
return super().update(instance, validated_data)