Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updating application should check the context config #916

Open
miraclx opened this issue Nov 1, 2024 · 0 comments
Open

fix: updating application should check the context config #916

miraclx opened this issue Nov 1, 2024 · 0 comments
Assignees

Comments

@miraclx
Copy link
Member

miraclx commented Nov 1, 2024

Updating the application for a context should first submit it to the context config contract

Here's the relevant snippet:

pub fn update_application_id(
&self,
context_id: ContextId,
application_id: ApplicationId,
) -> EyreResult<()> {
let mut handle = self.store.handle();
let key = ContextMetaKey::new(context_id);
let Some(mut value) = handle.get(&key)? else {
bail!("Context not found")
};
value.application = ApplicationMetaKey::new(application_id);
handle.put(&key, &value)?;
Ok(())
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants