Skip to content

Commit

Permalink
Fix upgrade available flag for custom apps
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Aug 8, 2024
1 parent d26ca06 commit 0ee6836
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/middlewared/middlewared/plugins/apps/ix_apps/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ def __hash__(self):
def upgrade_available_for_app(
version_mapping: dict[str, dict[str, dict[str, str]]], app_metadata: dict
) -> bool:
if version_mapping.get(app_metadata['train'], {}).get(app_metadata['name']):
# TODO: Eventually we would want this to work as well but this will always require middleware changes
# depending on what new functionality we want introduced for custom app, so let's take care of this at that point
if (app_metadata['name'] == 'custom-app' and app_metadata['train'] == 'stable') is False and version_mapping.get(
app_metadata['train'], {}
).get(app_metadata['name']):
return parse_version(app_metadata['version']) < parse_version(
version_mapping[app_metadata['train']][app_metadata['name']]['version']
)
Expand Down

0 comments on commit 0ee6836

Please sign in to comment.