Changeset 8360 for mauRepo/HPFos


Ignore:
Timestamp:
20/06/12 10:53:00 (7 years ago)
Author:
mnagni
Message:

The _packResult "missed" the first result
The view built a wrong hostURL

Location:
mauRepo/HPFos/trunk/src/HPFos
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/HPFos/trunk/src/HPFos/osImpl/myimpl.py

    r8355 r8360  
    239239        super(MyOSQuery, self).__init__(params) 
    240240 
    241     def _packResult(self, results, id = None, **kwargs): 
     241    def _packResult(self, results, **kwargs): 
    242242        subresults = [] 
    243243 
    244244        step = calculateStep(**kwargs) 
    245245 
    246         startIndex = self.indexOffset 
     246        startIndex = self.indexOffset - 1 
    247247        if kwargs['params_values'].has_key('startIndex'): 
    248248            if int(kwargs['params_values']['startIndex']) < len(results): 
  • mauRepo/HPFos/trunk/src/HPFos/view/view.py

    r8357 r8360  
    6060 
    6161def getDescription(request, collection_guid = None, observation_guid = None, result_guid = None): 
    62     ospath = _buildDescriptionOsPath(collection_guid, observation_guid, result_guid) 
     62    hostURL = _buildHostURL(request) 
     63    ospath = _buildDescriptionOsPath(hostURL, collection_guid, observation_guid, result_guid) 
    6364    response = os_engine.getDescription(ospath) 
    6465    context = {} 
     
    6768 
    6869def _doSearch(request, iformat, collection_guid = None, observation_guid = None, result_guid = None): 
    69     host = _buildHostURL(request)    
     70    hostURL = _buildHostURL(request)    
    7071    #params = {'q': ['ice', 'snow']} 
    7172    params = request.GET.copy() 
     
    9495    return _doSearch(request, iformat, collection_guid, observation_guid, result_guid)    
    9596 
    96 def _buildDescriptionOsPath(collection_guid = None, observation_guid = None, result_guid = None): 
     97def _buildDescriptionOsPath(hostURL, collection_guid = None, observation_guid = None, result_guid = None): 
    9798    ospath = "%s/search/" % (hostURL) 
    9899    if collection_guid: 
Note: See TracChangeset for help on using the changeset viewer.