mirror of
https://github.com/ansible/awx.git
synced 2026-03-14 15:37:29 -02:30
Get created_by and modified_by updating automatically.
This commit is contained in:
@@ -253,11 +253,7 @@ class ListAPIView(generics.ListAPIView, GenericAPIView):
|
||||
|
||||
class ListCreateAPIView(ListAPIView, generics.ListCreateAPIView):
|
||||
# Base class for a list view that allows creating new objects.
|
||||
|
||||
def pre_save(self, obj):
|
||||
super(ListCreateAPIView, self).pre_save(obj)
|
||||
if isinstance(obj, PrimordialModel):
|
||||
obj.created_by = self.request.user
|
||||
pass
|
||||
|
||||
class SubListAPIView(ListAPIView):
|
||||
# Base class for a read-only sublist view.
|
||||
|
||||
Reference in New Issue
Block a user