I have two functions
def xyz(obj):
obj_queryset = Sample.objects.filter(id=obj.id)
callfunction(obj_queryset)
def callfunction(obj_queryset):
for obj in obj_queryset:
obj.start_date = datetime.date.today()
obj.end_date = datetime.date.today()
obj.save()
I need it as a queryset for certain reasons because i want to update multiple objects and I am also doing few calculations before updating which I am not posting here.
Is there any way to turn obj into a queryset without doing a database query.