trying to resolve potential issues with foreign site login bases
[sfa.git] / sfa / plc / slices.py
index c35f753..84698f3 100644 (file)
@@ -230,7 +230,8 @@ class Slices:
         (slice_hrn, type) = urn_to_hrn(slice_xrn)
         site_hrn = get_authority(slice_hrn)
         # login base can't be longer than 20 characters
-        authority_name = get_leaf(site_hrn) 
+        slicename = hrn_to_pl_slicename(hrn)
+        authority_name = slicename.split('_')[0]
         login_base = authority_name[:20]
         sites = self.api.plshell.GetSites(self.api.plauth, login_base)
         if not sites: