diff options
| author | Barry Warsaw | 2011-08-30 19:11:19 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-08-30 19:11:19 -0400 |
| commit | 0664713d4f7e30b0b56b1ce00ccf3367f416c901 (patch) | |
| tree | 7bc824930335b25aa5e13346992b4754f5ca1e64 /src/mailman/model/user.py | |
| parent | 043562c695387a12e655997abf41cef77cb3d3a4 (diff) | |
| parent | 5a38df15cd6ca0619e0e987624457e0453425dce (diff) | |
| download | mailman-0664713d4f7e30b0b56b1ce00ccf3367f416c901.tar.gz mailman-0664713d4f7e30b0b56b1ce00ccf3367f416c901.tar.zst mailman-0664713d4f7e30b0b56b1ce00ccf3367f416c901.zip | |
Diffstat (limited to 'src/mailman/model/user.py')
| -rw-r--r-- | src/mailman/model/user.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mailman/model/user.py b/src/mailman/model/user.py index a29837bb4..53c96c3a2 100644 --- a/src/mailman/model/user.py +++ b/src/mailman/model/user.py @@ -26,6 +26,7 @@ __all__ = [ from storm.locals import ( DateTime, Int, RawStr, Reference, ReferenceSet, Unicode) +from storm.properties import UUID from zope.interface import implements from mailman.config import config @@ -52,7 +53,7 @@ class User(Model): id = Int(primary=True) real_name = Unicode() password = RawStr() - _user_id = Unicode() + _user_id = UUID() _created_on = DateTime() addresses = ReferenceSet(id, 'Address.user_id') @@ -73,8 +74,9 @@ class User(Model): config.db.store.add(self) def __repr__(self): - return '<User "{0.real_name}" ({0.user_id}) at {1:#x}>'.format( - self, id(self)) + short_user_id = self.user_id.int + return '<User "{0.real_name}" ({2}) at {1:#x}>'.format( + self, id(self), short_user_id) @property def user_id(self): |
