Skip to content

Commit

Permalink
fix: Check if publish version exist
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Nov 8, 2024
1 parent 29d558f commit a95eb6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion terraso_backend/apps/story_map/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ def handle_config_media(new_config, story_map, request):
if (current_config is None) or (not current_config.get("chapters")):
return new_config

all_active_chapters = current_published_config["chapters"] + new_config["chapters"]
all_active_chapters = (
new_config["chapters"]
if current_published_config is None
else current_published_config["chapters"] + new_config["chapters"]
)

# Delete changed media
current_media = [
Expand Down

0 comments on commit a95eb6b

Please sign in to comment.