I am using the vdc.GetMetadata() funtion as a user belonging to the system organization. I get the following error when calling this as a system user:
runtime error: index out of range [1] with length 1
This is happening because the function GetMetadata() uses the function getAdminVdcURL to get the admin url. But the url this function gets is already an admin url, since I am accessing the Metadata as a system user.
Reproduction steps
1. Authenticate as a system org user
2. try to call vdc.GetMetadata()
Expected behavior
The vdc.GetMetadata() should be able to distinguish if it needs to get the admin url or just use the one that the vdc object has.
Describe the bug
I am using the vdc.GetMetadata() funtion as a user belonging to the system organization. I get the following error when calling this as a system user:
This is happening because the function GetMetadata() uses the function getAdminVdcURL to get the admin url. But the url this function gets is already an admin url, since I am accessing the Metadata as a system user.
Reproduction steps
Expected behavior
The vdc.GetMetadata() should be able to distinguish if it needs to get the admin url or just use the one that the vdc object has.
Additional context
I will open a pull request to fix this issue.