Skip to content

Commit

Permalink
fix value access of ref
Browse files Browse the repository at this point in the history
(cherry picked from commit 9e10550)
  • Loading branch information
petersutter committed Dec 11, 2024
1 parent 8754a10 commit 3401a73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/src/composables/useProjectContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export function createProjectContextComposable (options = {}) {

function createProjectManifest () {
manifest.value = {}
if (openMFP.accountId) {
if (openMFP.accountId.value) {
set(manifest.value, ['metadata', 'label', 'openmfp.org/managed-by'], 'true')
set(manifest.value, ['metadata', 'annotations', 'openmfp.org/account-id'], openMFP.accountId)
set(manifest.value, ['metadata', 'annotations', 'openmfp.org/account-id'], openMFP.accountId.value)
}
initialManifest.value = cloneDeep(normalizedManifest.value)
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/GAdministration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,9 @@ async function updateProperty (key, value, options = {}) {
metadata: { name },
spec: { namespace },
}
if (openMFP.accountId && !get(projectStore.project, ['metadata', 'annotations', 'openmfp.org/account-id'])) {
if (openMFP.accountId.value && !get(projectStore.project, ['metadata', 'annotations', 'openmfp.org/account-id'])) {
set(mergePatchDocument, ['metadata', 'labels', 'openmfp.org/managed-by'], 'true')
set(mergePatchDocument, ['metadata', 'annotations', 'openmfp.org/account-id'], openMFP.accountId)
set(mergePatchDocument, ['metadata', 'annotations', 'openmfp.org/account-id'], openMFP.accountId.value)
}
set(mergePatchDocument, ['spec', key], value)
await projectStore.patchProject(mergePatchDocument)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/GProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ const canCreateProject = toRef(authzStore, 'canCreateProject')
const projectDialog = ref(false)

const projectList = computed(() => {
const belongsToAccount = project => openMFP.accountId === get(project, ['metadata', 'annotations', 'openmfp.org/account-id'])
return !openMFP.accountId
const belongsToAccount = project => openMFP.accountId.value === get(project, ['metadata', 'annotations', 'openmfp.org/account-id'])
return !openMFP.accountId.value
? projectStore.projectList
: filter(projectStore.projectList, belongsToAccount)
})
Expand Down

0 comments on commit 3401a73

Please sign in to comment.