Check if user provided webURL before trying to access it (#4510)

The check should have already happened in the CLI layer. And we cannot do the check here this function is also shared with export which might not have a filter.

Follow up to https://github.com/alcionai/corso/pull/4496

<!-- PR description-->

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2023-10-17 11:23:44 +05:30 committed by GitHub
parent 706849a006
commit 622eecf707
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,11 +272,11 @@ func FilterGroupsRestoreInfoSelectors(
) { ) {
var site string var site string
// It is possible that neither exists as this filter is only
// mandatory for restore and not for export.
if len(opts.SiteID) > 0 { if len(opts.SiteID) > 0 {
site = opts.SiteID[0] site = opts.SiteID[0]
} else { } else if len(opts.WebURL) > 0 {
// using else instead of else if so that it would have a hard
// fail in case we somehow miss checking this earlier
site = opts.WebURL[0] site = opts.WebURL[0]
} }