bigghuggs commited on
Commit
b8403f8
·
verified ·
1 Parent(s): ac3bdb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -1078,7 +1078,7 @@ def summaryClick(seshid):
1078
  print('summaryClick -- counts_totals: ', all_counts, all_totals, sesh.counts_totals)
1079
  if sesh.summary_closed:
1080
  sesh.summary_closed = False
1081
- store_data = {store: (lambda data: '' if not data or store.split()[0].lower() not in data[0]['STORE'].lower() or 'ZIPCODE' not in data[0] or 'PHONE' not in data[0] or 'STATE' not in data[0] or data[0]['STATE'] != sesh.state or len(data[0]['STATE']) != 2 or len(data[0]['PHONE']) != 12 else '\n'.join(['\n'.join([('\t\t\t'+key if key.lower() != 'store' else '\t\tNAME')+': '+value for key,value in d.items()]) for d in data]))(retrieveProcessedStoreData(store, )) for store in sesh.summary_joined}
1082
  #store_data = {store: (lambda data: '' if not data or 'zipcode' not in data[0] else '\n'.join([str(d) for d in data]))(retrieveProcessedStoreData(store, seshid)) for store in sesh.summary_joined}
1083
  item_summary_data = '\n\n'.join(['STORE: '+store+'\n'+('\tLOCATIONS: N/A' if not store_data[store] else '\tLOCATIONS: \n'+store_data[store])+''.join(['\n\tPRODUCT: '+ product +'\n\tPRICE: '+pd_count['product_dict']['price']+'\n\tSOURCE: '+pd_count['product_dict']['href'] for product,pd_count in sesh.summary_joined[store].items()]) for store in sesh.summary_joined])
1084
  print('store summary: ', {store: retrieveProcessedStoreData(store, seshid) for store in sesh.summary_joined})
 
1078
  print('summaryClick -- counts_totals: ', all_counts, all_totals, sesh.counts_totals)
1079
  if sesh.summary_closed:
1080
  sesh.summary_closed = False
1081
+ store_data = {store: (lambda data: '' if not data or store.split()[0].lower() not in data[0]['STORE'].lower() or 'ZIPCODE' not in data[0] or 'PHONE' not in data[0] or 'STATE' not in data[0] or data[0]['STATE'] != sesh.state or len(data[0]['STATE']) != 2 or len(data[0]['PHONE']) != 12 else '\n'.join(['\n'.join([('\t\t\t'+key if key.lower() != 'store' else '\t\tNAME')+': '+value for key,value in d.items()]) for d in data]))(retrieveProcessedStoreData(store, seshid)) for store in sesh.summary_joined}
1082
  #store_data = {store: (lambda data: '' if not data or 'zipcode' not in data[0] else '\n'.join([str(d) for d in data]))(retrieveProcessedStoreData(store, seshid)) for store in sesh.summary_joined}
1083
  item_summary_data = '\n\n'.join(['STORE: '+store+'\n'+('\tLOCATIONS: N/A' if not store_data[store] else '\tLOCATIONS: \n'+store_data[store])+''.join(['\n\tPRODUCT: '+ product +'\n\tPRICE: '+pd_count['product_dict']['price']+'\n\tSOURCE: '+pd_count['product_dict']['href'] for product,pd_count in sesh.summary_joined[store].items()]) for store in sesh.summary_joined])
1084
  print('store summary: ', {store: retrieveProcessedStoreData(store, seshid) for store in sesh.summary_joined})