Skip to content

Commit

Permalink
Add comments to explain the fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
loremattei authored and Lorenzo Mattei committed Aug 28, 2023
1 parent c976e9a commit 23ea7c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deliver/lib/deliver/upload_metadata.rb
Expand Up @@ -222,6 +222,11 @@ def upload(options)
app_info_worker.start

# Update categories
# When there are iOS and macOS implementations of the same app,
# fetch_edit_app_info will fail when trying to fetch data for one platform
# if the other is in not editable state.
# We still keep fetch_edit_app_info as first option to make sure
# latest data is fetched when apps are in an editable state.
app_info = fetch_edit_app_info(app) || fetch_live_app_info(app)
if app_info
category_id_map = {}
Expand Down Expand Up @@ -459,6 +464,11 @@ def retry_if_nil(message, tries: 5, wait_time: 10)

# Finding languages to enable
def verify_available_info_languages!(options, app, languages)
# When there are iOS and macOS implementations of the same app,
# fetch_edit_app_info will fail when trying to fetch data for one platform
# if the other is in not editable state.
# We still keep fetch_edit_app_info as first option to make sure
# latest data is fetched when apps are in an editable state.
app_info = fetch_edit_app_info(app) || fetch_live_app_info(app)

unless app_info
Expand Down

0 comments on commit 23ea7c0

Please sign in to comment.