feat: base get_object加锁时注意is_deleted过滤采用base_manager
This commit is contained in:
parent
3f2db2a4af
commit
ae7863871a
|
|
@ -111,7 +111,7 @@ class CustomGenericViewSet(MyLoggingMixin, GenericViewSet):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
obj = queryset.get(**filter_kwargs)
|
obj = queryset.get(**filter_kwargs)
|
||||||
l_obj = queryset.model.objects.select_for_update().get(pk=obj.pk)
|
l_obj = queryset.model._base_manager.select_for_update().get(pk=obj.pk)
|
||||||
self.check_object_permissions(self.request, l_obj)
|
self.check_object_permissions(self.request, l_obj)
|
||||||
return l_obj
|
return l_obj
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue