1👍
You need to remove the self.
, d is the object that is currently being iterated over.
for d in Shiftdate.objects.select_related('sit_date'):
d.shift_date=self.sit_date
Note:
-
You won’t actually be storing the value in the models since you don’t
save()
it -
Your return won’t work since its outside the loop and even then it will only return the first.
Source:stackexchange.com