older gids will still have the hrn encoded in the gid, so when decodeing first check...
[sfa.git] / sfa / trust / gid.py
index 2350af1..cde4476 100644 (file)
@@ -116,7 +116,9 @@ class GID(Certificate):
 
         self.uuid = dict.get("uuid", None)
         self.urn = dict.get("urn", None)
-        self.hrn = urn_to_hrn(self.urn)[0]
+        self.hrn = dict.get("hrn", None)    
+        if self.urn:
+            self.hrn = urn_to_hrn(self.urn)[0]
 
     ##
     # Dump the credential to stdout.