diff --git a/cmd/juju/application/deployer/charm.go b/cmd/juju/application/deployer/charm.go
index <HASH>..<HASH> 100644
--- a/cmd/juju/application/deployer/charm.go
+++ b/cmd/juju/application/deployer/charm.go
@@ -419,7 +419,6 @@ func (c *charmStoreCharm) PrepareAndDeploy(ctx *cmd.Context, deployAPI DeployerA
 		return errors.Trace(err)
 	}
 	c.origin = origin
-
 	if err := c.validateCharmFlags(); err != nil {
 		return errors.Trace(err)
 	}
@@ -484,13 +483,13 @@ func (c *charmStoreCharm) PrepareAndDeploy(ctx *cmd.Context, deployAPI DeployerA
 	}
 
 	ctx.Infof("Deploying charm %q.", formattedCharmURL)
+	c.series = series
+	c.csMac = csMac
+	c.origin = csOrigin
 	c.id = application.CharmID{
 		URL:    curl,
 		Origin: c.origin,
 	}
-	c.series = series
-	c.csMac = csMac
-	c.origin = csOrigin
 	return c.deploy(ctx, deployAPI)
 }
Ensure origin same in id and charmStoreCharm origin.

Add origin to ID after the value has been set, not before.