fix test
This commit is contained in:
parent
cf5150b7c9
commit
498d2ec92f
|
@ -1091,10 +1091,10 @@ class ExportsView(View):
|
||||||
return my_data, customer_details
|
return my_data, customer_details
|
||||||
|
|
||||||
def get_customer_details_from_request(self):
|
def get_customer_details_from_request(self):
|
||||||
|
try:
|
||||||
if len(request.referrer.split('/lot/')) < 2:
|
if len(request.referrer.split('/lot/')) < 2:
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
|
||||||
lot_id = request.referrer.split('/lot/')[-1].split('/')[0]
|
lot_id = request.referrer.split('/lot/')[-1].split('/')[0]
|
||||||
lot = Lot.query.filter_by(owner=g.user).filter_by(id=lot_id).first()
|
lot = Lot.query.filter_by(owner=g.user).filter_by(id=lot_id).first()
|
||||||
return lot.transfer.customer_details
|
return lot.transfer.customer_details
|
||||||
|
|
Reference in a new issue