Skip to content

Commit

Permalink
Fix determining series for a local bundle
Browse files Browse the repository at this point in the history
Fixes #891
  • Loading branch information
cderici committed Jul 14, 2023
1 parent 0690d4b commit e4a72ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion juju/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ async def _handle_local_charms(self, bundle, bundle_dir):
if not series:
metadata = utils.get_local_charm_metadata(charm_dir)
series = await get_charm_series(metadata, self.model)
if not self.model.connection().is_using_old_client and not series:
if not series:
base = utils.get_local_charm_base(None, charm_path, client.Base)
series = utils.base_channel_to_series(base.channel)
if not series:
raise JujuError(
"Couldn't determine series for charm at {}. "
"Add a 'series' key to the bundle.".format(charm_dir))
Expand Down

0 comments on commit e4a72ba

Please sign in to comment.