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() {
7272
7373 @ Override
7474 public void execute () {
75- List <ProjectRole > projectRoles ;
75+ List <ProjectRole > projectRoles = new ArrayList <>() ;
7676 if (getProjectId () != null && getProjectRoleId () != null ) {
7777 projectRoles = Collections .singletonList (projRoleService .findProjectRole (getProjectRoleId (), getProjectId ()));
7878 } else if (StringUtils .isNotBlank (getRoleName ())) {
Original file line number Diff line number Diff line change @@ -157,24 +157,14 @@ export default {
157157 this .fetchData ()
158158 },
159159 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- },
171160 methods: {
172161 fetchData () {
173162 const params = {}
174163 params .projectId = this .resource .id
175164 params .page = this .page
176165 params .pageSize = this .pageSize
177166 this .updateProjectApi = this .$store .getters .apis .updateProject
167+ if (! this .resource .id ) return
178168 this .fetchUsers ()
179169 this .fetchProjectAccounts (params)
180170 if (this .isProjectRolesSupported ()) {
Original file line number Diff line number Diff line change @@ -173,17 +173,6 @@ export default {
173173 mounted () {
174174 this .fetchData ()
175175 },
176- watch: {
177- resource: {
178- deep: true ,
179- handler (newItem ) {
180- if (! newItem || ! newItem .id ) {
181- return
182- }
183- this .fetchData ()
184- }
185- }
186- },
187176 methods: {
188177 initForm () {
189178 this .formRef = ref ()
@@ -192,6 +181,7 @@ export default {
192181 },
193182 fetchData () {
194183 this .loading = true
184+ if (! this .resource .id ) return
195185 api (' listProjectRoles' , { projectid: this .resource .id }).then (json => {
196186 const projectRoles = json .listprojectrolesresponse .projectrole
197187 if (! projectRoles || projectRoles .length === 0 ) {
You can’t perform that action at this time.
0 commit comments