File tree Expand file tree Collapse file tree 3 files changed +3
-23
lines changed
api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project Expand file tree Collapse file tree 3 files changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public String getRoleName() {
72
72
73
73
@ Override
74
74
public void execute () {
75
- List <ProjectRole > projectRoles ;
75
+ List <ProjectRole > projectRoles = new ArrayList <>() ;
76
76
if (getProjectId () != null && getProjectRoleId () != null ) {
77
77
projectRoles = Collections .singletonList (projRoleService .findProjectRole (getProjectRoleId (), getProjectId ()));
78
78
} else if (StringUtils .isNotBlank (getRoleName ())) {
Original file line number Diff line number Diff line change @@ -157,24 +157,14 @@ export default {
157
157
this .fetchData ()
158
158
},
159
159
inject: [' parentFetchData' ],
160
- watch: {
161
- resource: {
162
- deep: true ,
163
- handler (newItem ) {
164
- if (! newItem || ! newItem .id ) {
165
- return
166
- }
167
- this .fetchData ()
168
- }
169
- }
170
- },
171
160
methods: {
172
161
fetchData () {
173
162
const params = {}
174
163
params .projectId = this .resource .id
175
164
params .page = this .page
176
165
params .pageSize = this .pageSize
177
166
this .updateProjectApi = this .$store .getters .apis .updateProject
167
+ if (! this .resource .id ) return
178
168
this .fetchUsers ()
179
169
this .fetchProjectAccounts (params)
180
170
if (this .isProjectRolesSupported ()) {
Original file line number Diff line number Diff line change @@ -173,17 +173,6 @@ export default {
173
173
mounted () {
174
174
this .fetchData ()
175
175
},
176
- watch: {
177
- resource: {
178
- deep: true ,
179
- handler (newItem ) {
180
- if (! newItem || ! newItem .id ) {
181
- return
182
- }
183
- this .fetchData ()
184
- }
185
- }
186
- },
187
176
methods: {
188
177
initForm () {
189
178
this .formRef = ref ()
@@ -192,6 +181,7 @@ export default {
192
181
},
193
182
fetchData () {
194
183
this .loading = true
184
+ if (! this .resource .id ) return
195
185
api (' listProjectRoles' , { projectid: this .resource .id }).then (json => {
196
186
const projectRoles = json .listprojectrolesresponse .projectrole
197
187
if (! projectRoles || projectRoles .length === 0 ) {
You can’t perform that action at this time.
0 commit comments