code: def clean(self):
          '''
          Verify that the user and staffMember are not mismatched.
          Location can only be specified if user and staffMember are not.
          '''
  
          if self.staffMember and self.staffMember.userAccount and \
          self.user and not self.staffMember.userAccount == self.user:
              raise ValidationError(_('Transaction party user does not match staff member user.'))
  
          if self.location and (self.user or self.staffMember):
              raise ValidationError(_('Transaction party may not be both a Location and a User or StaffMember.')f clean(self):
          '''
          Verify that the user and staffMember are not mismatched.
          Location can only be specified if user and staffMember are not.
          '''
  
          if self.staffMember and self.staffMember.userAccount and \
          self.user and not self.staffMember.userAccount == self.user:
              raise ValidationError(_('Transaction party user does not match staff member user.'))
  
          if self.location and (self.user or self.staffMember):
              raise ValidationError(_('Transaction party may not be both a Location and a User or StaffMember.'))
docs: Verify that the user and staffMember are not mismatched.
          Location can only be specified if user and staffMember are not.