Question : for i in range(a.id,b.id+1): AttributeError: 'NoneType' object has no attribute 'id'
Answered by : sleepy-stag-u50cpx121by0
for i in range(a.id,b.id+1):
AttributeError: 'NoneType' object has no attribute 'id'
Source : | Last Update : Fri, 30 Oct 20
Question : for i in range(a.id,b.id+1): AttributeError: 'NoneType' object has no attribute 'id'
Answered by : sleepy-stag-u50cpx121by0
a=Employee.objects.all().first()
b=Employee.objects.all().last()
for i in range(a.id,b.id+1): lat = Employee.objects.get(id=i) if(lat.status==True): mailid=lat.email
Source : | Last Update : Fri, 30 Oct 20