From e588513a6920926873b8566ce9b3e50eb4de95ba Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Fri, 7 Sep 2012 12:02:55 -0400 Subject: [PATCH] update a urn's type in Xrn.__init__() --- sfa/util/xrn.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 38656a70..9a5740c8 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -123,16 +123,18 @@ class Xrn: if Xrn.is_urn(xrn): self.hrn=None self.urn=xrn - if type: - self.type=type if id: self.urn = "%s-%s" % (self.urn, str(id)) self.urn_to_hrn() + if type: + self.type=type + self.hrn_to_urn() else: self.urn=None self.hrn=xrn self.type=type self.hrn_to_urn() + self._normalize() # happens all the time .. # if not type: -- 2.43.0