| Line 1016... |
Line 1016... |
| 1016 |
anotherCondition = or_(Retailers.contact1==contact,Retailers.contact2==contact)
|
1016 |
anotherCondition = or_(Retailers.contact1==contact,Retailers.contact2==contact)
|
| 1017 |
elif(searchType=="counter"):
|
1017 |
elif(searchType=="counter"):
|
| 1018 |
contact = contact.lower()
|
1018 |
contact = contact.lower()
|
| 1019 |
anotherCondition = or_(Retailers.contact1==contact,Retailers.contact2==contact)
|
1019 |
anotherCondition = or_(Retailers.contact1==contact,Retailers.contact2==contact)
|
| 1020 |
|
1020 |
|
| 1021 |
retailerModifedCondition = and_(Retailers.modified is not None, anotherCondition)
|
1021 |
retailerModifedCondition = and_(Retailers.modified.isnot(None), anotherCondition)
|
| 1022 |
searchUser = session.query(Retailers).filter(retailerModifedCondition).all()
|
1022 |
searchUser = session.query(Retailers).filter(retailerModifedCondition).all()
|
| 1023 |
if searchUser is None:
|
1023 |
if searchUser is None:
|
| 1024 |
resp.body = json.dumps("{}")
|
1024 |
resp.body = json.dumps("{}")
|
| 1025 |
else:
|
1025 |
else:
|
| 1026 |
resp.body = json.dumps({"Retailers":[todict(getRetailerObj(user)) for user in searchUser]}, encoding='utf-8')
|
1026 |
resp.body = json.dumps({"Retailers":[todict(getRetailerObj(user)) for user in searchUser]}, encoding='utf-8')
|