Add User.employee convenience attribute.
				
					
				
			This commit is contained in:
		
							parent
							
								
									dcf0dd9b8d
								
							
						
					
					
						commit
						a0492f1fac
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -120,6 +120,14 @@ class User(Base):
 | 
			
		|||
            return self.person.display_name
 | 
			
		||||
        return self.username
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def employee(self):
 | 
			
		||||
        """
 | 
			
		||||
        Convenience attribute to fetch a reference to the connected
 | 
			
		||||
        ``Employee`` instance, or ``None``.
 | 
			
		||||
        """
 | 
			
		||||
        return self.person.employee if self.person else None
 | 
			
		||||
 | 
			
		||||
    def get_email_address(self):
 | 
			
		||||
        """
 | 
			
		||||
        Returns the primary email address for the user (as unicode string), or
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue