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

Fix issue #20 #23

Merged
merged 6 commits into from
Oct 31, 2023
Merged

Fix issue #20 #23

merged 6 commits into from
Oct 31, 2023

Conversation

mohamadkhalaj
Copy link
Member

No description provided.

aggify/aggify.py Outdated

from aggify.compiler import F, Match, Q, Operators # noqa keep
from aggify.exceptions import (
AggifyValueError,
AnnotationError,
InvalidField,
InvalidEmbeddedField,
OutStageError,
OutStageError, InvalidArgument,
Copy link
Member

Choose a reason for hiding this comment

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

format code

aggify/aggify.py Outdated
)
from aggify.types import QueryParams
from aggify.utilty import (
to_mongo_positive_index,
check_fields_exist,
replace_values_recursive,
convert_match_query,
convert_match_query, check_field_exists, get_db_field,
Copy link
Member

Choose a reason for hiding this comment

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

format code

aggify/aggify.py Outdated
or issubclass(join_field.document_type, EmbeddedDocument)
or len(split_query) == 1
or (len(split_query) == 2 and split_query[1] in Operators.ALL_OPERATORS)
isinstance(join_field, TopLevelDocumentMetaclass)
Copy link
Member

Choose a reason for hiding this comment

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

add comment and description about what do this code

aggify/aggify.py Outdated
from_collection_name = from_collection._meta.get("collection") # noqa

if not let and not (local_field and foreign_field):
raise InvalidArgument(expected_list=[['local_field', 'foreign_field'], 'let'])
Copy link
Member

Choose a reason for hiding this comment

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

replace ' with "

return self.base_model is not None and isinstance(
self.base_model._fields.get(field), # type: ignore # noqa
EmbeddedDocumentField,
return self.base_model is not None and (
Copy link
Member

Choose a reason for hiding this comment

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

add doc string

@seyed-dev seyed-dev merged commit 0e94799 into Aggify:main Oct 31, 2023
1 check passed
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.

2 participants