I make a POST request, enter the data into the table, but after that I do a Get and get the old data in this case
def get_queryset(self):
transaction.commit()
if self.action not in ['retrieve', 'list', 'create', 'selector']:
res = self.queryset.filter(is_editable=True)
else:
res = self.queryset
return res
Up-to-date data)
def get_queryset(self):
transaction.commit()
if self.action not in ['retrieve', 'list', 'create', 'selector']:
res = self.queryset.filter(is_editable=True)
else:
res = Presence.objects.all()
return res