- __mapper_args__ = { 'polymorphic_on' : classtype }
-
- fields = [ 'type', 'hrn', 'gid', 'authority', 'peer_authority' ]
- def __init__ (self, type=None, hrn=None, gid=None, authority=None, peer_authority=None,
- pointer=None, dict=None):
- if type: self.type=type
- if hrn: self.hrn=hrn
- if gid:
- if isinstance(gid, StringTypes): self.gid=gid
- else: self.gid=gid.save_to_string(save_parents=True)
- if authority: self.authority=authority
- if peer_authority: self.peer_authority=peer_authority
- if pointer: self.pointer=pointer
- if dict: self.load_from_dict (dict)
+ __mapper_args__ = {'polymorphic_on': classtype}
+
+ fields = ['type', 'hrn', 'gid', 'authority', 'peer_authority']
+
+ def __init__(self, type=None, hrn=None, gid=None, authority=None, peer_authority=None,
+ pointer=None, dict=None):
+ if type:
+ self.type = type
+ if hrn:
+ self.hrn = hrn
+ if gid:
+ if isinstance(gid, StringType):
+ self.gid = gid
+ else:
+ self.gid = gid.save_to_string(save_parents=True)
+ if authority:
+ self.authority = authority
+ if peer_authority:
+ self.peer_authority = peer_authority
+ if pointer:
+ self.pointer = pointer
+ if dict:
+ self.load_from_dict(dict)