Commit b3d4c853 authored by Martin Schorb's avatar Martin Schorb
Browse files

fix tile and substack init with None inputs

parent 3b23a1a3
Pipeline #25759 passed with stage
in 21 seconds
......@@ -13,13 +13,9 @@ import dash_html_components as html
from dash.dependencies import Input, Output, State, MATCH, ALL
from dash.exceptions import PreventUpdate
import requests
import json
from app import app
import params
from utils import helper_functions as hf
@app.callback(Output({'component': 'store_stackparams', 'module': MATCH}, 'data'),
Input({'component':'stack_dd','module' : MATCH},'value'),
......@@ -34,7 +30,10 @@ def stacktoparams(stack_sel,allstacks):
if not(stack_sel=='-' ):
stacklist = [stack for stack in allstacks if stack['stackId']['stack'] == stack_sel]
if not stacklist == []:
stackparams = stacklist[0]
stackparams = stacklist[0]
if 'None' in (stackparams['stackId']['owner'],stackparams['stackId']['project']):
return dash.no_update
thisstore['stack'] = stackparams['stackId']['stack']
thisstore['stackparams'] = stackparams
......
......@@ -34,14 +34,20 @@ for idx in range(params.max_tileviews):
Input({'component': 'stack_dd','module': MATCH},'value'),
State({'component': 'store_allstacks', 'module': MATCH}, 'data'))
def stacktoslice(stack_sel,allstacks):
stacklist=[]
stacklist=[]
if (not stack_sel=='-' ) and (not allstacks is None):
stacklist = [stack for stack in allstacks if stack['stackId']['stack'] == stack_sel]
# stack = stack_sel
if not stacklist == []:
stackparams = stacklist[0]
stackparams = stacklist[0]
if 'None' in (stackparams['stackId']['owner'],stackparams['stackId']['project']):
return dash.no_update
o_min = stackparams['stats']['stackBounds']['minZ']
o_max = stackparams['stats']['stackBounds']['maxZ']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment