Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
sultaniman committed Apr 17, 2024
1 parent b831908 commit 65a6d57
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions dlt/helpers/streamlit_app/blocks/resource_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,8 @@ def resource_state_info(
resource_name: str,
) -> None:
sources_state = pipeline.state.get("sources") or {}
if not sources_state:
return

schema = sources_state.get(schema_name)
if not schema:
return

resource = schema["resources"].get(resource_name)

schema = sources_state.get(schema_name, {})
resource = schema.get("resources", {}).get(resource_name)
with st.expander("Resource state", expanded=(resource is None)):
if not resource:
st.info(f"{resource_name} is missing resource state")
Expand Down

0 comments on commit 65a6d57

Please sign in to comment.