Sage-Bionetworks / rocc-service

ROCC REST API service
Apache License 2.0
1 stars 0 forks source link

Fix challenge filter #120

Closed tschaffter closed 3 years ago

tschaffter commented 3 years ago

Using Swagger UI: Searching for name=DREAM returns a single result but says that the number of items matching the request is 46 (the total number of challenges).

{
  "challenges": [
    {
      "dataProviderIds": [
        "rockefeller-university"
      ],
      "description": "The goal of the DREAM Olfaction Prediction Challenge is to find models that can predict how a molecule smells from its physical and chemical features. A model that allows us to predict a smell from a molecule will provide fundamental insights into how odor chemicals are trans ...",
      "endDate": "2015-05-01T00:00:00Z",
      "grantIds": [],
      "id": "60e7640a6e4aeee1ed9dd868",
      "name": "DREAM Olfaction Prediction",
      "organizerIds": [
        "60e764066e4aeee1ed9dd741",
        "60e764066e4aeee1ed9dd742",
        "60e764066e4aeee1ed9dd743",
        "60e764066e4aeee1ed9dd744",
        "60e764066e4aeee1ed9dd745",
        "60e764066e4aeee1ed9dd747",
        "60e764066e4aeee1ed9dd746",
        "60e764066e4aeee1ed9dd748",
        "60e764066e4aeee1ed9dd749",
        "60e764066e4aeee1ed9dd74d",
        "60e764066e4aeee1ed9dd74a"
      ],
      "startDate": "2015-01-15T00:00:00Z",
      "status": "closed",
      "summary": "The goal of the DREAM Olfaction Prediction Challenge is to find models that can predict how a molecule smells from its physical and chemical features. A model that allows us to predict a smell from a molecule will provide fundamental insights into how odor chemicals are transformed into a smell percept in the brain. Further, being able to predict how a chemical smells will greatly accelerate the design of new molecules to be used as fragrances. Currently, fragrance chemists synthesize many molecules to obtain a new ingredient, but most of these will not have the desired qualities.",
      "tagIds": [
        "olfaction"
      ],
      "url": "https://www.synapse.org/#!Synapse:syn2811262"
    }
  ],
  "limit": 10,
  "offset": 0,
  "paging": {
    "next": ""
  },
  "totalResults": 46
}
tschaffter commented 3 years ago

First issue: I was apply the mongoengine condition istartswith instead of icontains.