X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=020040c98294e4703950adc3aee45e461e8b2f0e;hb=8e1fab57c0ef76f5ce25c0480a9bb056cf25ebc3;hp=837ce8e47b39dfe270d9a70b0f9a2eeed8395a35;hpb=b114f8978208938ea05cf2e3c69e84740cedb831;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 837ce8e4..020040c9 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -2802,7 +2802,7 @@ __all__.append('get_suite_src_formats') ################################################################################ -class Uid(object): +class Uid(ORMObject): def __init__(self, uid = None, name = None): self.uid = uid self.name = name @@ -2819,8 +2819,11 @@ class Uid(object): # This signals to use the normal comparison operator return NotImplemented - def __repr__(self): - return '' % (self.uid, self.name) + def properties(self): + return ['uid', 'name', 'fingerprint'] + + def not_null_constraints(self): + return ['uid'] __all__.append('Uid') @@ -3261,7 +3264,8 @@ class DBConn(object): mapper(Uid, self.tbl_uid, properties = dict(uid_id = self.tbl_uid.c.id, - fingerprint = relation(Fingerprint))) + fingerprint = relation(Fingerprint)), + extension = validator) mapper(UploadBlock, self.tbl_upload_blocks, properties = dict(upload_block_id = self.tbl_upload_blocks.c.id,