Browse Source

fix the user registration field lookups

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
4dda6a212a
  1. 4
      pyweb/mumble/models.py
  2. 6
      pyweb/mumble/utils.py

4
pyweb/mumble/models.py

@ -536,8 +536,8 @@ def mk_registration_property( field, doc="" ):
""" Create a property for the given registration field. """ """ Create a property for the given registration field. """
def get_field( self ): def get_field( self ):
if "comment" in self.registration:
return self.registration["comment"];
if field in self.registration:
return self.registration[field];
else: else:
return None; return None;

6
pyweb/mumble/utils.py

@ -28,3 +28,9 @@ class ObjectInfo( object ):
def __unicode__( self ): def __unicode__( self ):
return unicode( self.__dict__ ); return unicode( self.__dict__ );
def __contains__( self, name ):
return name in self.__dict__;
def __getitem__( self, name ):
return self.__dict__[name];
Loading…
Cancel
Save