Ignore:
Timestamp:
21/06/12 17:05:14 (7 years ago)
Author:
mnagni
Message:

CEDA_Observations were not correctly added to CEDA_ObservationCollection.member

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/moles3epb.py

    r8358 r8387  
    167167            @return: True if the collection contains the given observation, False otherwise   
    168168        """ 
    169         ret = self._session.query(CEDA_ObservationCollection, CEDA_Observation).filter(CEDA_ObservationCollection.id==obs_coll_id).filter(CEDA_Observation.id==obs_id).count() > 0 
    170         return ret 
     169        coll = self._session.query(CEDA_ObservationCollection).filter(CEDA_ObservationCollection.id==obs_coll_id).first() 
     170        obs = self._session.query(CEDA_Observation).filter(CEDA_Observation.id==obs_id).first() 
     171        return obs in coll.member 
    171172 
    172173    def observationAuthor(self, obs_id): 
Note: See TracChangeset for help on using the changeset viewer.