mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-29 00:07:18 +00:00
fix: 修复管理用户批量删除失败的bug
This commit is contained in:
parent
72deb005a6
commit
16333fa1aa
@ -18,7 +18,11 @@ def pre_create_historical_record_callback(sender, instance=None, history_instanc
|
|||||||
for attr in attrs_to_copy:
|
for attr in attrs_to_copy:
|
||||||
if getattr(history_instance, attr):
|
if getattr(history_instance, attr):
|
||||||
continue
|
continue
|
||||||
if not history_instance.systemuser:
|
try:
|
||||||
|
system_user = history_instance.systemuser
|
||||||
|
except SystemUser.DoesNotExist:
|
||||||
|
continue
|
||||||
|
if not system_user:
|
||||||
continue
|
continue
|
||||||
system_user_attr_value = getattr(history_instance.systemuser, attr)
|
system_user_attr_value = getattr(history_instance.systemuser, attr)
|
||||||
if system_user_attr_value:
|
if system_user_attr_value:
|
||||||
|
Loading…
Reference in New Issue
Block a user