Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(): fix v3 widget upload error #3783

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,13 @@ def collect_stories(install_path):
examples_path = os.path.join(install_path, "dist", "examples.json")
types_path = os.path.join(install_path, "dist", "types.json")
bricks_path = os.path.join(install_path, "dist", "bricks.json")
with open(bricks_path) as bricks_file:
bricks_content = simplejson.load(bricks_file)
isV3Brick = "id" in bricks_content
with open(stories_path) as stories_file:
stories_content = simplejson.load(stories_file)
# v2 brick
if isV3Brick == False:
if not os.path.exists(manifest_path):
return stories_content
# v3 brick
elif isV3Brick:
elif os.path.exists(manifest_path):
stories_list = []
with open(manifest_path) as manifest_file:
manifest_content = simplejson.load(manifest_file)
Expand Down
Loading