This commit is contained in:
Cayo Puigdefabregas 2023-03-10 21:56:17 +01:00
parent cf5150b7c9
commit 498d2ec92f

View file

@ -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