mirror of https://github.com/jumpserver/jumpserver
fix: 修复管理用户批量删除失败的bug
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