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

✨[#414] add in operator to API #440

Merged
merged 3 commits into from
Aug 30, 2024
Merged

✨[#414] add in operator to API #440

merged 3 commits into from
Aug 30, 2024

Conversation

Coperh
Copy link
Contributor

@Coperh Coperh commented Aug 27, 2024

Fixes #414

data={"name": "demo3"}, object__object_type=self.object_type
)

response = self.client.get(self.url, {"data_attrs": "name__in__demo1|demo2"})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't really like this format, but I cannot think of a better one. The comma is already used for multiple attributes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah, not sure what alternatives there are

@Coperh Coperh force-pushed the feature/414-in-operator branch from d526b8a to 1522017 Compare August 27, 2024 15:22
Copy link
Contributor

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall

src/objects/api/constants.py Outdated Show resolved Hide resolved
data={"name": "demo3"}, object__object_type=self.object_type
)

response = self.client.get(self.url, {"data_attrs": "name__in__demo1|demo2"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah, not sure what alternatives there are

Co-authored-by: Steven Bal <[email protected]>
@Coperh Coperh force-pushed the feature/414-in-operator branch from f4fb6b8 to 4dc90a2 Compare August 30, 2024 08:33
@Coperh Coperh requested a review from stevenbal August 30, 2024 08:40
@Coperh Coperh merged commit 590495f into master Aug 30, 2024
20 checks passed
@Coperh Coperh deleted the feature/414-in-operator branch August 30, 2024 09:36
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.

Support the __in operator in data_attrs to match one element
2 participants