Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove operator and value in payload if they are None in AdvancedParams #27

Closed
wants to merge 2 commits into from

Conversation

NISH1001
Copy link
Collaborator

Major Fixes:

  • Removes the keys operator and value in pynequa.AdvanedParams payload generation if they are empty/none/null. This fixes the issue when we want to filter (say by "collection") and we don't want to apply any operator.

Sample:

{
    'app': 'vanilla-search',
    'query': {
        'name': 'query',
        'text': 'himawari',
        'isFirstpage': False,
        'strictRefine': False,
        'removeDuplicates': False,
        'action': 'search',
        'page': 1,
        'pageSize': 10,
        'advanced': {
            'collection': '/user_needs_database/snwg-assessments-2020/',
            # 'value': None, 'operator': None,
        }
    }
}

Sample:

```python
{
    'app': 'vanilla-search',
    'query': {
        'name': 'query',
        'text': 'himawari',
        'isFirstpage': False,
        'strictRefine': False,
        'removeDuplicates': False,
        'action': 'search',
        'page': 1,
        'pageSize': 10,
        'advanced': {
            'collection': '/user_needs_database/snwg-assessments-2020/',
            # 'value': None, 'operator': None,
        }
    }
}
```
@NISH1001 NISH1001 requested a review from anisbhsl February 27, 2024 20:34
Now col_name and values are checked to see if empty.
@NISH1001 NISH1001 closed this Feb 27, 2024
@NISH1001 NISH1001 deleted the feature/bugfix-advanced-params branch February 27, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant