Skip to content

Commit 048f559

Browse files
authored
Merge branch 'main' into include-instance-url-env-var
2 parents 4924028 + 4d08436 commit 048f559

3 files changed

Lines changed: 25 additions & 22 deletions

File tree

frontend/src/pages/admin/Templates/index.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ export default {
9494
this.nextCursor = result.meta.next_cursor
9595
result.templates.forEach(v => {
9696
// map owner to top tier to show in table
97-
v.owner_avatar = v.owner.avatar
98-
v.owner_id = v.owner.id
99-
v.owner_username = v.owner.username
100-
97+
if (v.owner) {
98+
v.owner_avatar = v.owner.avatar
99+
v.owner_id = v.owner.id
100+
v.owner_username = v.owner.username
101+
}
101102
this.templates.push(v)
102103
})
103104
this.loading = false

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/forge/routes/api/project_spec.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2800,9 +2800,10 @@ describe('Project API', function () {
28002800
response.statusCode.should.eqls(200)
28012801

28022802
const json = response.json()
2803-
json.settings.env[5].should.have.property('name', 'hidden_var')
2804-
json.settings.env[5].should.have.property('value', '')
2805-
json.settings.env[5].should.have.property('hidden', true)
2803+
const hiddenVar = json.settings.env.find(envVar => envVar.name === 'hidden_var')
2804+
should.exist(hiddenVar)
2805+
hiddenVar.should.have.property('value', '')
2806+
hiddenVar.should.have.property('hidden', true)
28062807
})
28072808
it('should store hidden env vars', async () => {
28082809
const projectSettings = await TestObjects.project1.getSetting('settings')
@@ -2823,9 +2824,10 @@ describe('Project API', function () {
28232824
})
28242825
const json = response.json()
28252826

2826-
json.settings.env[5].should.have.property('name', 'hidden_var')
2827-
json.settings.env[5].should.have.property('value', '')
2828-
json.settings.env[5].should.have.property('hidden', true)
2827+
const hiddenVar = json.settings.env.find(envVar => envVar.name === 'hidden_var')
2828+
should.exist(hiddenVar)
2829+
hiddenVar.should.have.property('value', '')
2830+
hiddenVar.should.have.property('hidden', true)
28292831

28302832
const updatedProjectSettings = await TestObjects.project1.getSetting('settings')
28312833
updatedProjectSettings.env[0].should.have.property('name', 'hidden_var')

0 commit comments

Comments
 (0)