Answers for "for i in range(a.id,b.id+1): AttributeError: 'NoneType' object has no attribute 'id'"

0

for i in range(a.id,b.id+1): AttributeError: 'NoneType' object has no attribute 'id'

for i in range(a.id,b.id+1):
AttributeError: 'NoneType' object has no attribute 'id'
Posted by: Guest on October-23-2020
0

for i in range(a.id,b.id+1): AttributeError: 'NoneType' object has no attribute 'id'

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
Posted by: Guest on October-23-2020

Code answers related to "for i in range(a.id,b.id+1): AttributeError: 'NoneType' object has no attribute 'id'"

Browse Popular Code Answers by Language